C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
moveBy method in JavaScript
WhatsApp
Mahak Gupta
5y
4.7
k
0
0
25
Blog
moveBy method in JavaScript
moveBy() method s used to move the current window to its position.
<html>
<head>
<script type=
"text/javascript"
>
function
openmywindow() {
myfirstwindow = window.open(
''
,
''
,
'width=100,height=100'
);
myfirstwindow.document.write(
"<p>This is the example of moveBy() method in Window</p>"
);
}
function
movemywindow() {
myfirstwindow.moveBy(300, 300);
myfirstwindow.focus();
}
</script>
</head>
<body>
<input type=
"button"
value=
"Open The Window"
onclick=
"openmywindow()"
/>
<br /><br />
<input type=
"button"
value=
"Move The Window"
onclick=
"movemywindow()"
/>
</body>
</html>
People also reading
Membership not found