下面的例子把新窗口移动到指定屏幕左上角(屏幕左上角为 0,0 坐标,往右和下计算为正):
<html>
<body>
<script type="text/javascript">
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
myWindow.moveTo(0,0)
</script>
</body>
</html>
说明:如果你想让弹出窗口直接出现在合适位置(而不是出现再移动),可以直接在 open() 方法里设定合适的参数。