window.open()在ajax中不起作用
window.open() not working in ajax
我只想在ajax返回成功后打开一个窗口。但它不起作用。窗口未打开。以下是示例代码。
$.ajax({
type: "POST",
url : 'checkIfMemberIsAPaidMember.php',
dataType : "html",
success: function(data)
{
var w = window.open('expressInterestPopUp.php','_blank','resizable = no, toolbar = 0,location = no, menubar = 0, height = 400, width = 600, left = 400,top = 300');
},
error : function()
{
alert("Sorry, The requested property could not be found.");
}
});
请使用
async:false
在ajax中,调用。这是因为浏览器限制了ajax调用中弹出窗口的打开。如果ajax调用是同步的,那么窗口将打开,不会出现任何问题。
相关文章:
- 带有.change()的AJAX不起作用
- JavaScript ajax不起作用
- 正在导入Jquery,但AJAX不起作用
- jQuery添加/删除类&AJAX不起作用
- 单击按钮后调用AJAX不起作用
- JQUERY + PHP + AJAX 不起作用
- 当我在提交表单中具有函数时,Ajax 不起作用
- 跨域 AJAX 不起作用,即使使用通配符来源也是如此
- 为什么ajax不起作用,除非我刷新或使用location.href
- 带有jQuery + PHP的Ajax不起作用
- jsp Ajax 不起作用
- JQuery 在动态添加输入字段时单击浏览,而 ajax 不起作用
- 图像上传 ajax 不起作用
- CasperJS后AJAX不起作用
- 在JQuery Mobile中禁用Ajax不起作用
- 当 fn() 放置在外部文件中时,Ajax 不起作用
- JavaScript ajax不起作用
- 延迟链接ajax不起作用
- Datatables-刷新/重新加载ajax不起作用
- 循环的AJAX不起作用