cometd: dojo 跨越访问之JSONP
http://www.matrix.org.cn/resource/article/2008-03-06/b2e0ea4e-eb69-11dc-91da-b599c3ba16ef.html // if xdomain,then we assume jsonp for handshake if(this._isXD){ bindArgs.callbackParamName = "jsonp"; r = dojo.io.script.get(bindArgs); }else{ r = dojo.xhrPost(bindArgs); } attach: function(/*String*/id,/*String*/url,/*Document?*/frameDocument){ // summary: // creates a new <script> tag pointing to the specified URL and // adds it to the document. // description: // Attaches the script element to the DOM. Use this method if you // just want to attach a script to the DOM and do not care when or // if it loads. var doc = (frameDocument || dojo.doc); var element = doc.createElement("script"); element.type = "text/javascript"; element.src = url; element.id = id; doc.getElementsByTagName("head")[0].appendChild(element); }, cometd 里面有JSONP的知识,所以搜索了一下,见上面的链接。 预备知识: (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- 详解js的延迟对象、跨域、模板引擎、弹出层、AJAX【附实例下
- 单机安装步骤---ttlsa教程系列之neo4j(一)
- flash – 通过Loader将参数传递给swf
- c# – HttpWebRequest.GetResponse方法抛出404异常
- Swift:参数类型'[String:ValueType]’不符合预期类型
- c# – For-Statement,每1000次演练,做点什么
- Ajax初学体验(2)[检验用户名是否重复的完整实例]
- ruby – 创建/编辑Vagrant基本框以预安装cookbook
- C语言学习笔记--break、continue、return和goto
- 盲人程序员:在Xcode中设计界面,无法在UI元素中进行视觉定位