新窗口打开写法

a标签

有资料指出,可以这么写:

<a hre="一个网址" target="_Blank"></a>

其中:

  • _Blank是新窗口
  • _Self是自身
  • _Parent是父窗口
  • _Top是顶层窗口

js实现

window.open()

更多

"top.location.href"是最外层的页面跳转
"window.location.href"、"location.href"是本页面跳转
"parent.location.href"是上一层页面跳转.

猜你喜欢

转载自www.cnblogs.com/oneTheLoser/p/12296804.html