html中input按钮怎么添加超链接


比较完整的写法:
<a href="链接">
  <input type=button onclick="window.location.href('连接')">
</a> 

注:1.若直接在本页跳转到新的页面,则用: <input type=button onclick="window.location.href('连接')">
  2.如果需要打开一个新的页面进行跳转,则用: <input type=button onclick="window.open('连接')">


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM