JSFiddle - React, Tailwind, and code Playground
HTML
<a id="a1" href="https://www.google.com/">google</a>
<input type="button" onclick="openwindow()" value="open new tab">
JavaScript
function openwindow() {
var a = document.getElementById("a1").href
window.open(a, '_blank');
}