resizeBy and resizeTo window property in Javascript

 resizeBy and resizeTo window property in Javascript


 

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> resizeBy and resizeTo window property in Javascript</title>

</head>
<body >
 
<button onclick="func1()">OPEN GOOGLE</button><br><br>
<button onclick="func2()">MOVE WINDOW</button><br><br>
<button onclick="func3()">RESIZE WINDOW - resizeTo</button><br><br>
<button onclick="func4()">RESIZE WINDOW - resizeBy </button>

<script>
    var a ;
function func1()
{
     a =  window.open("","_blank",
     "width=100px,height=100px,left=10px,top=10px");
     a.document.write("HELLO WORLD!!");
}

function func2()
{
      a.moveTo(100,100);
}
function func3()
{
      a.resizeTo(200,200);
}
function func4()
{
      a.resizeBy(200,200);
}

</script>

</body>
</html>
 
 
 

 

Comments

Popular posts from this blog