1.例子 :

window.open("index.jsp","_self");

window.open()格式:

window.open( [sURL] [, sName] [, sFeatures] [, bReplace])
参数说明:
其中第二个参数定义打开的窗口名,或者用_blank指定新窗口,_top指定顶级窗口等。这个名字以后能用在A或者form的target参数中。

而窗口的长宽等是定义在sFeatures中,如height=200,width=400

最后一个参数是true/false,用来指定是否在替换当前浏览器历史中的地址

在js中有那么几个类似保留字的东东解释一下:
_self 表示当前窗口
_blank 表示新窗口
_parent 表示父窗口
_top 表示顶层窗口

 

相关文章:

  • 2021-11-29
  • 2021-08-19
  • 2022-01-19
  • 2021-10-14
  • 2021-09-19
  • 2021-07-30
  • 2022-01-07
  • 2022-02-21
猜你喜欢
  • 2021-09-09
  • 2021-12-27
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案