saikat mukherjee saikat mukherjee - 9 months ago 30
Javascript Question

<button formtarget="_blank"></button> not working

I have a button tag that is referring to a link given as below

<button onclick="window.location=''" formtarget="_blank"></button>

but its opening in the same tab what's the problem


formtarget only work for form, if you want for link, You can try this

<button onclick="'', '_blank');">BUTTON TEST</button>