当前位置:开发者网络 >> 网页特效 >> 浏览窗口 >> 内容
精彩推荐
分类最新特效
分类热点特效
  
打开窗口的位置
日期:2005-06-22   人气:   【字体: 】【收藏此文


<!-- 网页特效代码由[中国WEB开发者网络:http://www.ChinaWebDev.com]提供! -->
<!-- 要实现此效果需要 1 个步骤: -->

<!-- 第 1 步: -->
<!-- 把下面的代码加到<BODY></BODY>区域中: -->

<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://www.yahoo.com";
popup = window.open(URL,"MenuPopup",windowprops);
}
// End -->
</script>
<table>
<tr>

<td>
<form name=popupform>
<pre>
打开页面的参数<br>
Distance from left edge: <input type=text name=left size=2 maxlength=4> pixels
Distance from top edge: <input type=text name=top size=2 maxlength=4> pixels

Width of popup window: <input type=text name=width size=2 maxlength=4> pixels
Height of popup window: <input type=text name=height size=2 maxlength=4> pixels
</pre>
<center>
<input type=button value="Open the Popup!" onClick="popupPage(this.form.left.value, this.form.top.value, this.form.width.value, this.form.height.value)">
</center>
</form>
</td>

</tr>
</table>