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

        <bdo id='AEILT'></bdo><ul id='AEILT'></ul>
    1. <tfoot id='AEILT'></tfoot>
    2. <legend id='AEILT'><style id='AEILT'><dir id='AEILT'><q id='AEILT'></q></dir></style></legend>

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

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

      如何使用 JSONP 克服 XSS 問題?

      How to use JSONP to overcome XSS issue?(如何使用 JSONP 克服 XSS 問題?)
      <legend id='hbrIh'><style id='hbrIh'><dir id='hbrIh'><q id='hbrIh'></q></dir></style></legend>
          <tbody id='hbrIh'></tbody>
          <bdo id='hbrIh'></bdo><ul id='hbrIh'></ul>
          <i id='hbrIh'><tr id='hbrIh'><dt id='hbrIh'><q id='hbrIh'><span id='hbrIh'><b id='hbrIh'><form id='hbrIh'><ins id='hbrIh'></ins><ul id='hbrIh'></ul><sub id='hbrIh'></sub></form><legend id='hbrIh'></legend><bdo id='hbrIh'><pre id='hbrIh'><center id='hbrIh'></center></pre></bdo></b><th id='hbrIh'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hbrIh'><tfoot id='hbrIh'></tfoot><dl id='hbrIh'><fieldset id='hbrIh'></fieldset></dl></div>

          <tfoot id='hbrIh'></tfoot>

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

              • 本文介紹了如何使用 JSONP 克服 XSS 問題?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我在碼頭服務器上執行了一段 javascript,該服務器正在向另一臺服務器(wamp 服務器)上的 scoket 發送 XMLHTTPRequest.請求被發送到套接字,但是 XHR 響應似乎被阻塞了.

                I have a piece of javascript executing on a jetty server which is sending a XMLHTTPRequest to a scoket on another server(wamp server). The request gets sent to the socket, however the XHR response seems to be getting blocked.

                我聽說我可以使用 JSONP 來解決這個問題.但是,由于我對 javascript 都很陌生,而且我從未使用過 JSONP 技術,在此之前我非常感謝有關如何使用這種技術的任何幫助?

                I have heard that I can use JSONP to overcome this problem. However as I am new to both javascript and I have never used JSONP technique before I would greatly appreciate any help in how to use this technique?

                function sendPost(url, postdata, callback) {
                
                xmlHttp=GetXmlHttpObject()
                
                if (xmlHttp==null) {
                    alert ("Browser does not support HTTP Request")
                    return
                } 
                
                xmlHttp.onreadystatechange=callback
                xmlHttp.open("POST",url,true)
                xmlHttp.send(postdata);
                
                }
                
                function sendInitRQ(width, height) {
                
                var post = "<?xml version="1.0" encoding="UTF-8"?><command     type="init"><width>" + width + "</width><height>" + height + "</height></command>";
                
                sendPost("http://localhost:80/socket.php", post, initReturned);
                
                }
                

                我知道 php 套接字正在接收帖子,因為當我檢查服務器日志時,我在 get 請求中得到 200.

                I know that the php socket is recieving the post as when i check the server log i get a 200 on the get request.

                我只想知道如何使用 JSONP 方法?我已經看到了這種方法的例子,但我仍然不確定如何去做.

                I just want to know how can I use the JSONP approach? I have seen exampples of the approach but Iam stilll unsure of how to do it.

                推薦答案

                JSONP 技術使用完全不同的機制向服務器發出 HTTP 請求并根據響應進行操作.它需要客戶端頁面和服務器上的協作代碼.服務器必須有一個 URL 來響應 HTTPGET"請求,其中包含一個包裹在函數調用中的 JSON 塊.因此,您不能只對任何舊服務器進行 JSONP 事務;它必須是明確提供該功能的服務器.

                The JSONP technique uses a completely different mechanism for issuing HTTP requests to a server and acting on the response. It requires cooperating code in the client page and on the server. The server must have a URL that responds to HTTP "GET" requests with a block of JSON wrapped in a function call. Thus, you can't just do JSONP transactions to any old server; it must be a server that explicitly provides the functionality.

                這個想法是您的客戶端代碼動態創建一個

                主站蜘蛛池模板: 亚洲精品第一 | 亚洲码欧美码一区二区三区 | 亚州av| 91久久久久久 | 久久国产一区 | 色性av| 日韩精品中文字幕一区二区三区 | 国产欧美日韩综合精品一区二区 | 不卡在线一区 | 国产精品久久久久久久久久久久久久 | 亚洲人成在线观看 | 亚洲欧美在线一区 | 亚洲综合大片69999 | 欧美精品一区二区三区在线播放 | 成人一级毛片 | 久久久亚洲综合 | 精品99久久久久久 | 日本在线视频一区二区 | 日韩av手机在线观看 | 欧美日韩大片 | 日韩在线一区二区三区 | 911精品国产 | 成人av播放 | 日韩国产一区二区三区 | 国产一区影院 | 国产精品一卡二卡三卡 | 日韩视频精品在线 | 国产高清免费视频 | 亚洲成色777777在线观看影院 | 日韩三区在线 | 日韩欧美久久 | 国产欧美日韩在线一区 | 成人国产精品免费观看视频 | 久久精品免费观看 | 一本色道精品久久一区二区三区 | 91精品国产91久久久久久 | 欧美精品一二三区 | 精品久久久久久久久久 | 视频1区| 免费观看一级特黄欧美大片 | 欧美日韩视频在线 |