使用window.open 打开新窗口容易被浏览器拦截,可以使用下面的方法解决
if ($("#jiedaitype").val() == "1") {
var a = $("<a href='/jiedai/daikuan.html' target='_blank'></a>").get(0);
var e = document.createEvent('MouseEvents');
e.initEvent('click', true, true);
a.dispatchEvent(e);
}
else {
var a = $("<a href='/jiedai/chanpin.html' target='_blank'></a>").get(0);
var e = document.createEvent('MouseEvents');
e.initEvent('click', true, true);
a.dispatchEvent(e);
}