I have an iframe advertisment on my site, and i want when I click it to automatically opens in another tab. But I don't really know how to do it. I am trying with that way but it isnt working:
document.getElementById("ad_frame").contentWindow.document.body.click()