js onclick用法:跳转到指定URL
使用onclick跳转到其他页面/跳转到指定url ☆如果是本页显示可以直接用location,方法如下: ①οnclick="javascript:window.location.href='http://www.huierlp.com'" ②οnclick="location='http://www.huierlp.com'" ③οnclick="window.location.href='http://www.huierlp.com" ☆如果页面中有frame可以将在location前面添加top.mainframe.frames['right_frame'].location 例: <pre> ====== <input type="button"value="注册" οnclick="javascript:window.location.href='http://www.huierlp.com'"/> ====== </pre> 来源: CSDN 作者: miner_lee 链接: https://blog.csdn.net/miner_lee/article/details/20900915