How to use both onclick and target=”_blank”

Instead use window.open():

The syntax is:

window.open(strUrl, strWindowName[, strWindowFeatures]);

Your code should have:

window.open("https://stackoverflow.com/questions/19588708/Prosjektplan.pdf");

Your code should be:

<p class="downloadBoks"
   onclick="window.open("https://stackoverflow.com/questions/19588708/Prosjektplan.pdf")">Prosjektbeskrivelse</p>

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)