下面例子的弹出窗口在弹出后将往右移动 150 像素,往下移动 50 像素:
<html>
<body>
<script type="text/javascript">
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
myWindow.moveBy(150,50)
</script>
</body>
</html>
说明:如果你想让弹出窗口直接出现在合适位置(而不是出现再移动),可以直接在 open() 方法里设定合适的参数。