Sometimes surfing the web with chrome,I encounter a website or web app,when click on an <a> or <button> element it opens a new popup browser window which does not have tab section while I do not have any Chrome Extension installed:
main window:

popup new window:

My question is,How to do this using JavaScript?
Thanks.
Please see tutorial here: http://www.w3schools.com/jsref/met_win_open.asp
<script>
function myFunction() {
window.open("http://www.w3schools.com","_blank",
"toolbar,scrollbars,resizable,top=500,left=500,width=400,height=400");
}
</script>
<!DOCTYPE html>
<html>
<body>
<button onclick="openTheWindow()">open window</button>
<script>
function openTheWindow() {
var myWindow = window.open("", "", "width=800,height=800");
}
</script>
</body>
</html>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With