window.moveBy
In this chapter you will learn:
window.moveBy(distance, distance)
The following code moves a windows by 100 pixels.
<!DOCTYPE HTML> <!--from j a va 2s .com-->
<html>
<head>
<title>Example</title>
</head>
<body>
<script type="text/javascript">
//move the window down by 100 pixels
window.moveBy(0, 100);
</script>
</body>
</html>
Move left
The following code moves window to the left.
<!DOCTYPE HTML> <!-- j a v a 2s . c om-->
<html>
<body>
<script type="text/javascript">
//move the window left by 50 pixels
window.moveBy(-50, 0);
</script>
</body>
</html>
Next chapter...
What you will learn in the next chapter:
Home » Javascript Tutorial » Window