<script> function m1() { window.open('https://google.com','_blank'); } </script> <button onclick="m1()">Click to Link</button>