我有这样的链接:
<a href="/index2.php?option=com_jumi&fileid=3&Itemid=11" onclick="window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,')
Run Code Online (Sandbox Code Playgroud)
我希望新的打开窗口以特定大小打开.如何指定高度和宽度?
Lar*_*ipp 166
<a href="/index2.php?option=com_jumi&fileid=3&Itemid=11"
onclick="window.open(this.href,'targetWindow',
'toolbar=no,
location=no,
status=no,
menubar=no,
scrollbars=yes,
resizable=yes,
width=SomeSize,
height=SomeSize');
return false;">Popup link</a>
Run Code Online (Sandbox Code Playgroud)
宽度和高度是像素.
Ada*_*iss 27
window.open ("http://www.javascript-coder.com",
"mywindow","menubar=1,resizable=1,width=350,height=250");
Run Code Online (Sandbox Code Playgroud)
从
http://www.javascript-coder.com/window-popup/javascript-window-open.phtml
:]
TGu*_*ond 18
window.open('http://somelocation.com','mywin','width=500,height=500');
Run Code Online (Sandbox Code Playgroud)
Joe*_*oel 12
只需将它们添加到参数字符串即可.
window.open(this.href,'targetWindow','toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=350,height=250')
Run Code Online (Sandbox Code Playgroud)
小智 11
<a style="cursor:pointer"
onclick=" window.open('http://YOUR.URL.TARGET','',' scrollbars=yes,menubar=no,width=500, resizable=yes,toolbar=no,location=no,status=no')">Your text</a>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
306253 次 |
最近记录: |