Move window to the left in JavaScript

Description

The following code shows how to move window to the left.

Example


<!--  w w w . j a  v a2 s .  c  o  m-->


<!DOCTYPE HTML>
<html>
<body>
<script type="text/javascript">

//move the window left by 50 pixels
window.moveBy(-50, 0);

</script>
</body>
</html>

Click to view the demo

The code above generates the following result.

Move window to the left in JavaScript