在HTML中,<form>表单的<input type="button">可以添加一个按钮。如果想让该按钮实现<a> 的超链接功能,需要如下实现:

    在新的窗口中打开页面(target = blank):<input type="button" onclick="window.open('new.jsp')">

    在当前窗口中打开页面(target = self)  :  <input type="button" onclick="window.location.href='new.jsp'">

 注意:第2个不要用onclick="window.location.href('new.jsp')" ,这种方式有些浏览器,如360安全浏览器等,不能够识别。

相关文章:

  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-01-30
  • 2022-01-15
  • 2021-12-02
  • 2021-11-04
猜你喜欢
  • 2022-01-02
  • 2022-12-23
  • 2021-12-03
  • 2022-12-23
  • 2022-02-13
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案