window.open与ajax的同步
来源:互联网 发布:深度linux下载 编辑:程序博客网 时间:2024/06/04 18:13
有个需求,在ajax提交新帖子后,要打开刚发的帖子:
$.ajax({ type: "POST", url: "list.php?action=addArticle", dataType: "json", data: data, success: function (msg) { window.open('http://baidu.com');//这里是模拟打开刚发的帖子}});
谁知道,怎么都打不开
把ajax改为同步的,就可以了:
async: false
$.ajax({ type: "POST", url: "list.php?action=addArticle", dataType: "json", data: data, async:false, //同步 success: function (msg) { window.open('http://baidu.com');//这里是模拟打开刚发的帖子}});
0 0
- window.open与ajax的同步
- window.open与document.open的区别
- window.open与document.open的区别
- window.open()与的区别
- Ajax同步链接在IE 与FireFox的使用差别 open("GET",url,false)
- ShowModalDialog与window.open的区别
- [转]ShowModalDialog与window.open的区别
- ShowModalDialog与window.open的区别
- showModalDialog与Window.open的区别
- window.open 与openwindow.location的区别
- ShowModalDialog与window.open的区别
- window.open()与window.close()
- window.open()与window.close()
- window.open与window.showModalDialog
- window.open()与window.opener()
- window.open与window.location
- window.location 与 window.open
- ajax打开新窗口window.open()被拦截的解决方法
- Java系统资源使用分析工具;
- 二叉树的深度优先遍历
- 中华电信宣布4G正式启用 台湾进入4G时代
- simulink中状态机的使用/Stateflow使用技巧与实例应用
- 用document.forms[formname].elements[elementname].value获取FORM元素的value--测试通过
- window.open与ajax的同步
- Flume(1.4)+Solr(4.3) Log analysis
- 曼彻斯特码编解码原理
- 平面三角形外接圆圆心与半径求解算法
- 白莲教(
- 给明年依然年轻的我们:欲望、外界、标签、天才、时间、人生目标、现实、后悔、和经历
- vware server+redhat5.4+asm
- 主机iis配置了站点域名,虚拟机如何访问主机站点
- 苹果发布全新编程语言之Swift编程语言开发新手入门基础教程