js 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
例:<input type="button"value="注册" onclick="javascript:window.location.href='register.php'"/>
如果是本页显示可以直接用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
例:<input type="button"value="注册" onclick="javascript:window.location.href='register.php'"/>
本文介绍如何使用JSONClick实现网页内的跳转功能,包括直接跳转和针对含有frame页面的跳转方法。提供了具体的HTML按钮示例代码。

687

被折叠的 条评论
为什么被折叠?



