久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<small id='nHrpS'></small><noframes id='nHrpS'>

    <legend id='nHrpS'><style id='nHrpS'><dir id='nHrpS'><q id='nHrpS'></q></dir></style></legend>

      • <bdo id='nHrpS'></bdo><ul id='nHrpS'></ul>
      <tfoot id='nHrpS'></tfoot>
    1. <i id='nHrpS'><tr id='nHrpS'><dt id='nHrpS'><q id='nHrpS'><span id='nHrpS'><b id='nHrpS'><form id='nHrpS'><ins id='nHrpS'></ins><ul id='nHrpS'></ul><sub id='nHrpS'></sub></form><legend id='nHrpS'></legend><bdo id='nHrpS'><pre id='nHrpS'><center id='nHrpS'></center></pre></bdo></b><th id='nHrpS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='nHrpS'><tfoot id='nHrpS'></tfoot><dl id='nHrpS'><fieldset id='nHrpS'></fieldset></dl></div>
    2. $.ajax 調用在 IE8 中運行良好,但在 Firefox 和 chr

      $.ajax call working fine in IE8 and Doesn#39;t work in firefox and chrome browsers($.ajax 調用在 IE8 中運行良好,但在 Firefox 和 chrome 瀏覽器中不起作用)

        • <i id='eoMYV'><tr id='eoMYV'><dt id='eoMYV'><q id='eoMYV'><span id='eoMYV'><b id='eoMYV'><form id='eoMYV'><ins id='eoMYV'></ins><ul id='eoMYV'></ul><sub id='eoMYV'></sub></form><legend id='eoMYV'></legend><bdo id='eoMYV'><pre id='eoMYV'><center id='eoMYV'></center></pre></bdo></b><th id='eoMYV'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='eoMYV'><tfoot id='eoMYV'></tfoot><dl id='eoMYV'><fieldset id='eoMYV'></fieldset></dl></div>

          <small id='eoMYV'></small><noframes id='eoMYV'>

        • <tfoot id='eoMYV'></tfoot>

              <bdo id='eoMYV'></bdo><ul id='eoMYV'></ul>
                <tbody id='eoMYV'></tbody>
            • <legend id='eoMYV'><style id='eoMYV'><dir id='eoMYV'><q id='eoMYV'></q></dir></style></legend>
                本文介紹了$.ajax 調用在 IE8 中運行良好,但在 Firefox 和 chrome 瀏覽器中不起作用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                這是我的代碼

                $.ajax(
                {
                    type: "GET", 
                    url: 'http://devserver:7995/stdpart/services/GetAllPartsWithFilter',
                    dataType: 'json',
                    data: jsonPartsData,
                    success: fnGetPartsData, 
                    error: PartsLoadError  
                });
                

                這是代碼在 IE8 中運行良好,但在 Firefox 和 Chrome 瀏覽器中運行失敗.當我檢查 XHR 對象時,它表示狀態代碼為 0.我檢查了所有其他問題,但沒有一個問題能幫助我識別問題.

                This is code working fine in IE8, But getting failed in Firefox and Chrome browsers. When i, inspect the XHR object, it's saying the status code code is 0. I have checked all other questions, none of them are helped me to identify the issue.

                如果我在這段代碼中做錯了什么,請告訴我.如果 $.ajax 有一些兼容性問題,那么請提出與之等效的建議.

                Let me know, if i am doing any thing wrong in this code. If $.ajax has some compatibility issues, then please suggest something equivalent to it.

                更新:我們在以下位置找到了一種解決方案http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html

                Update: We found one solution at http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html

                它使用了動態腳本的概念.我們在我們的應用程序中做了同樣的事情,然后每件事現在似乎都在工作.還是要全面分析.

                It is using the concept of Dynamic Scripting. We have done the same thing in our application, then every thing seems to be working now. Yet to analyze fully.

                推薦答案

                這是因為 同源政策.您不能使用 ajax 調用外部站點.如果你真的想使用,你必須使用 JSONP.或者您可以為此使用服務器端代理.意思是,在服務器端調用外部站點并對那個 web 服務進行 ajax 調用.

                this is because of the Same origin policy. you cannot use ajax to call external sites. if you really want to use, you have to use JSONP. Or you can use serverside proxy for this. means, call external site in the server side and do ajax call to the that webservice.

                更新:

                在您的網站中創建 webserviceice,并在 webmethod 中輸入以下代碼

                create webserveice in your site and in the webmethod put following code

                string proxyURL = "http://devserver:7995/stdpart/services/GetAllPartsWithFilter";
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(proxyURL);
                request.Method = "GET";
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
                
                if (response.StatusCode.ToString().ToLower() == "ok")
                {
                    Stream content = response.GetResponseStream();
                    StreamReader contentReader = new StreamReader(content);         
                    return contentReader.ReadToEnd();
                }
                return string.Empty;
                

                然后使用您的代碼訪問本地服務.

                then access local service using your code.

                更多信息請參考這個鏈接

                這篇關于$.ajax 調用在 IE8 中運行良好,但在 Firefox 和 chrome 瀏覽器中不起作用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                相關文檔推薦

                Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調用 abort (jQuery) 之后,瀏覽器也會等待 ajax 調用完成)
                JavaScript innerHTML is not working for IE?(JavaScript innerHTML 不適用于 IE?)
                XMLHttpRequest cannot load, No #39;Access-Control-Allow-Origin#39; header is present on the requested resource(XMLHttpRequest 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標頭) - IT屋-程序員軟件開發技術分
                Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請求是否有可能不遵循重定向 (301 302))
                NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內容)
                • <i id='EDu42'><tr id='EDu42'><dt id='EDu42'><q id='EDu42'><span id='EDu42'><b id='EDu42'><form id='EDu42'><ins id='EDu42'></ins><ul id='EDu42'></ul><sub id='EDu42'></sub></form><legend id='EDu42'></legend><bdo id='EDu42'><pre id='EDu42'><center id='EDu42'></center></pre></bdo></b><th id='EDu42'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EDu42'><tfoot id='EDu42'></tfoot><dl id='EDu42'><fieldset id='EDu42'></fieldset></dl></div>
                  <tfoot id='EDu42'></tfoot>

                  • <bdo id='EDu42'></bdo><ul id='EDu42'></ul>

                        1. <small id='EDu42'></small><noframes id='EDu42'>

                          <legend id='EDu42'><style id='EDu42'><dir id='EDu42'><q id='EDu42'></q></dir></style></legend>
                            <tbody id='EDu42'></tbody>
                          主站蜘蛛池模板: 精品日韩在线 | 天堂成人国产精品一区 | 国产a区 | 黄视频免费在线 | 97成人免费 | 视频一区 国产精品 | 欧美一级视频在线观看 | 久久国产视频网站 | 视频二区 | 欧美成视频| 亚洲精品久久久一区二区三区 | 亚洲一二三区在线观看 | 色成人免费网站 | 人人艹人人爽 | 国产999精品久久久久久绿帽 | 国产成人精品a视频一区www | 日韩国产在线观看 | 欧美国产日韩在线观看成人 | 免费一区在线观看 | 天天影视亚洲综合网 | 我爱操| 99免费在线 | 久久久久国产一区二区三区 | 免费激情av | 精品欧美一区二区三区久久久 | 华丽的挑战在线观看 | 精品国产三级 | 久久91 | 91在线视频播放 | 国产精品中文字幕在线观看 | 精品国产网 | 成人亚洲性情网站www在线观看 | 华丽的挑战在线观看 | 日韩免费福利视频 | 欧美激情第一区 | 免费骚视频 | 一本综合久久 | 亚洲国产一区二区视频 | 国产精品中文字幕在线 | 日韩精品一区二区三区在线播放 | 久久一级 |