document.getElementById("mahacareer").onclick = function () {
 location.href = "http://www.mahacareermitra.in";
};<a href="" target="_blank" id="mahacareer">Access the portal</a>hello i want to open above link in new tab when i click on it.we use target="_blank" attribute with a tag but i want to use that attribute with JavaScript.
 
     
    