打开窗口

来自「网页特效」· 代码 · 共 33 行

TXT
33
字号
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function popupPage(l, t, w, h) {
var windowprops = "location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes" +
",left=" + l + ",top=" + t + ",width=" + w + ",height=" + h;

var URL = "http://pc.gbdns.com/flash.swf";
popup = window.open(URL,"MenuPopup",windowprops);
}
//  End -->
</script>
<table>
<tr>

<td>
<form name=popupform>
<pre>
打开页面的参数<br>
离开左边的距离:  <input type=text name=left size=2 maxlength=4> pixels
离开右边的距离:  <input type=text name=top size=2 maxlength=4> pixels

窗口的宽度:      <input type=text name=width size=2 maxlength=4> pixels
窗口的高度:      <input type=text name=height size=2 maxlength=4> pixels
</pre>
<center>
<input type=button value="打开这个窗口!" onClick="popupPage(this.form.left.value, this.form.top.value, this.form.width.value, this.form.height.value)">
</center>
</form>
</td>
</tr>
</table>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?