开发者

How do I open a new browser tab?

I'm working on this project and I have to open a new browser tab. Actually, I have to open a target="_blank" link without the link. I know is not right to interfere with the user preferences, but hey, this is the project requirements.

So, long story short, i have to replicate the target="_blank" behavior only with javascri开发者_高级运维pt.

Is this even possible? Thanks!


window.open('http://www.example.com','_blank')


var w = window.open();
$(w.document.body).html("Whatever or any ajax response ...")
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜