How to open a new tab with javascript?

0

Hello! I have this function here:
function mostrar(id){ window.location = "visualizar.php?id=" + id;}

What do I call when the user clicks a <a href="javascript:mostrar(id)" target="_blank"></a>

And I want me to open a new tab and not close the current one. (It does not guide, like a popup) but it seems like target="_blank" is not working as usual. Is there anything to do in the javascript function to do this?

    
asked by anonymous 08.10.2016 / 02:47

0 answers