js模拟表单提交弹出新窗口被浏览器拦截,如何解决?

自定义表单比较,弹出的新窗口被拦截,如何解决这个问题?代码如下
function gotoLife_do(url,p){
$("#disabledImageZonelife").hide();
post(url,p);
}

function post(URL, PARAMS) {
var temp = document.createElement("form");
temp.action = URL;
temp.method = "post";
temp.setAttribute("target" , '_black' );
temp.style.display = "none";
for (var x in PARAMS) {
var opt = document.createElement("textarea");
opt.name = x;
opt.value = PARAMS[x];
temp.appendChild(opt);
}
document.body.appendChild(temp);
temp.submit();
return temp;
}

这个是浏览器设置的问题,应该是启用了弹窗屏蔽;这个有的机器是默认设置的,个人建议不要弹浏览器新tab,你可以通过ajax在后台语言(php,jsp...)控制器里面写方法用后台语言路由到新页面;
温馨提示:答案为网友推荐,仅供参考

相关了解……

你可能感兴趣的内容

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 非常风气网