moveBy method in JavaScript

moveBy method in JavaScript

 
moveBy() method s used to move the current window to its position.
  1. <html>  
  2.   
  3.      <head>  
  4.           <script type="text/javascript">  
  5.           function openmywindow() {  
  6.                myfirstwindow = window.open('''''width=100,height=100');  
  7.                myfirstwindow.document.write("<p>This is the example of moveBy() method in Window</p>");  
  8.           }  
  9.   
  10.           function movemywindow() {  
  11.                myfirstwindow.moveBy(300, 300);  
  12.                myfirstwindow.focus();  
  13.           }  
  14.           </script>  
  15.      </head>  
  16.   
  17.      <body>  
  18.           <input type="button" value="Open The Window" onclick="openmywindow()" />  
  19.           <br /><br />  
  20.           <input type="button" value="Move The Window" onclick="movemywindow()" />  
  21.      </body>  
  22.   
  23. </html>