JS 打开新窗口,不被拦截的方法
时间:2015/12/3 22:45:00来源:互联网 作者:flyso 点击: 2950 次
$(function() { $("#btn").click(function() { var a = $("<a href='http://www.857.net' target='_blank'>857</a>").get(0); var e = document.createEvent('MouseEvents'); e.initEvent( 'click', true, true ); a.dispatchEvent(e); }); }); |