window.open()有四个参数。
参数1:url
参数2:target或名字,可以是frame的name
_self :_parent _top _blank
参数3:a string of features(用,分割在,=前后不能有空格)
left : number
top : number
height : number
width : number
resizable : yes,no
scrollable : yes,no
toolbar : yes,no
status : yes,no
location : yes,no
参数4:布尔值,是否替换本窗口。默认false
如下这段代码将不能执行,因为,和=前后有空格。
window.open(“http://www.wrox.com/”, “wroxwindow”,
“height=150, width= 300, top=10, left= 10, resizable =yes”);
改成这样就可以正常执行。
window.open(“http://www.wrox.com/”, “wroxwindow”,
“height=150,width=300,top=10,left=10,resizable=yes”);