I want to open a new page with this :
window.open();
but I don't want to lose focusing current screen.
How can I handle this ?
I want to open a new page with this :
window.open();
but I don't want to lose focusing current screen.
How can I handle this ?
Question is not that much clear???? You need this functionality in React or in Plain HTML webpage ??
<html>
<body>
<p>Click the button to open a new tab </p>
<button onclick="NewTab()">
Open Geeksforgeeks
</button>
<script>
function NewTab() {
window.open(
"https://www.geeksforgeeks.org", "_blank");
}
</script>
</body>
</html>