摘要:1.CORS(跨源资源共享): 服务器端可以设置CORS头,允许特定或任意来源的请求。在响应头中添加以下字段:Access-Control-Allow-Origin: * 2. 使用代理服务器:在服务器端设置一个代理,将客户端的请求发送到代理服务器,然后由代理服务器转发到目标服务器。这样,客户端的实
阅读全文
摘要:主页面用window.showModalDialog的时候,如果直接打开其它系统的页面,这时候别人的页面在window.returnValue=1;这样返回值的时候,主页面是取不到返回值的,原因就是因为跨域了.解决办法如下:1,首先主页面testMain.jsp先打开一个中转页面,Java代码 ...
阅读全文
摘要:chrome控制台查看btn_comment_submit控件有没绑定事件functionlookEvents (elem) {return$.data ? $.data( elem, "events", undefined, true) : $._data( elem, "events");}va...
阅读全文
摘要:vargridStore=newExt.data.Store({id:'gridStore',proxy:newExt.data.HttpProxy({url:'http://www.cnblogs.com/HR/Pay/PayAjax/PayRollAjax.ashx?model=GetGridStore&year='+year+"&month="+month+"&TypeId="+TypeId}),reader:newExt.data.JsonReader({root:'data'
阅读全文
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--vareditGridPanel=newExt.grid.EditorGridPanel({cm:cm,store:store,autoScroll:true,frame:true,region:'c...
阅读全文
摘要:前两天.net web项目中用的jquery的 $.ajax 函数 在前台显示时有时有数据 有时没数据ff chorme 下基本上能读取数据, ie有时能读取数据 $.ajax({ type: "POST", url: "ajax.ashx?cid=1", data: "", timeout: 10000, async: true, dataType: 'html', success: funct...
阅读全文