xxxxxxxxxx
<a href="print.html"
onclick="window.open('print.html',
'newwindow',
'width=300,height=250');
return false;"
>Print</a>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<body>
<p>Click the button to open a new window called "MsgWindow" with some text.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
// JS function to open a new window(not "New Tab"), e.g: here, we are
// opening the new window in youtube.com
var myWindow = window.open("https://www.youtube.com", "", width = "100vw", height = "100vh");
}
</script>
</body>
</html>
xxxxxxxxxx
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
// JS function to open a new window(not "New Tab"), e.g: here, we are
// opening the new window in youtube.com
var myWindow = window.open("https://www.youtube.com", "", width = "100vw", height = "100vh");
}
</script>
</body>
</html>
xxxxxxxxxx
window.open("https://...", "_blank", "noopener");
//the 2nd argument opens in a new tab
//the 3rd argument is for security purposes