web前端攻城师吧 关注:13贴子:30
  • 0回复贴,共1

在HTML中使用onclick跳转指定url链接

只看楼主收藏回复

☆如果是在本页显示可以直接用location,方法如下:
  ①onclick="javascript:window.location.href='URL'"
  ②onclick="location='URL'"
  ③onclick="window.location.href='URL?id=11'"
☆如果页面中有frame可以将在location前面添加top.mainframe.frames['right_frame'].location


IP属地:北京1楼2015-07-30 16:41回复