打开窗口的位置 - 中国WEB开发者网络 (http://www.webasp.net) -- 网页特效 (http://www.webasp.net/javascript/) --- 打开窗口的位置 (http://www.webasp.net/javascript/1/616.htm) |
| -- 发布日期: 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> |
| webasp.net |