给button加超链接

  • Post author:
  • Post category:其他




1.如果让本页转向新的页面则用:



<input type=button οnclick=”window.location.href(‘连接’)”>



2.如果需要打开一个新的页面进行转向,则用:



<input type=button οnclick=”window.open(‘连接’)”>



3.如果需要返回到上次打开的页面,则用:


<input type=button οnclick=”window.history.back()”>