久久久久久久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久久久久 | 美日韩免费视频 | 在线观看国产91 | 欧美精品一区二区在线观看 | 午夜在线小视频 | 久久久精品一区 | 黄色男女网站 | 亚洲成人午夜电影 | 欧美一区二区三区视频在线 | 青青草视频免费观看 | 国产高清亚洲 | 欧美久久久久久 | 99re在线视频 | 精品久久国产老人久久综合 | 精品国产视频 | www.亚洲免费 | 国产精品99久久久久久人 | 亚洲网站在线观看 | 久久国色 | 中文字幕精品一区二区三区精品 | 日本一区二区高清视频 | 91精品在线看 | 欧美11一13sex性hd | 日韩中文在线视频 | 91精品一区二区 | 久久精品视频网站 | 国产日韩精品一区 | 精品视频免费 | 国产一区二区不卡 | 在线资源视频 | 欧美精品一二区 | 人妖一区| www日日日 | 四虎网站在线观看 | 久草网站 | 色综合久 | 精品久久久久久中文字幕 | 国产精品视频久久久久 | 亚洲国产aⅴ精品一区二区 免费观看av | 中文字幕在线观看www | 国产极品车模吞精高潮呻吟 |