How to open a new tab window in javascript

How to open a new tab window in javascript

Form.php

[dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”]

<html>
<head>
<title>Codelizar</title>
<script src=”https://code.jquery.com/jquery-3.4.1.js”></script>
<script type=”text/javascript”>
$(document).ready(function(){
$(‘#open_btn’).click(function(){
window.open(‘welcome.php, ‘_blank’);

});
});
</script>
</head>
<body>
<button id=”open_btn”>Click for open a new window</button>
</body>
</html>

[/dm_code_snippet]

 

welcome.php

[dm_code_snippet background=”yes” background-mobile=”yes” bg-color=”#abb8c3″ theme=”dark” language=”html” wrapped=”no”]

<html>
<head>
<title>Codelizar Tutorial</title>

</head>
<body>
<h1>Welcome in codelizar developer tutorial</h1>
</body>
</html>

[/dm_code_snippet]

Leave a Reply

Your email address will not be published.