HTML DOM moveTo() Method
Complete Window Object Reference
Definition and Usage
The moveTo() method moves a window's left and top edge to the specified coordinates.
Syntax
Example
The following example moves the new window to the specified coordinates:
<html>
<head>
<script type="text/javascript">
function moveWin()
{
myWindow.moveTo(50,50)
}
</script>
</head>
<body>
<script type="text/javascript">
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
</script>
<input type="button" value="Move 'myWindow'"
onclick="moveWin()" />
</body>
</html>
|
Try-It-Yourself Demos
Move a window
with moveTo()
Complete Window Object Reference
|
|
|