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

  • <small id='fFxSU'></small><noframes id='fFxSU'>

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

    • <bdo id='fFxSU'></bdo><ul id='fFxSU'></ul>
    <legend id='fFxSU'><style id='fFxSU'><dir id='fFxSU'><q id='fFxSU'></q></dir></style></legend>
  • <tfoot id='fFxSU'></tfoot>

      1. 如何發(fā)送“&amp;"?通過 AJAX 的(和號(hào))字符?

        How can I send the quot;amp;quot; (ampersand) character via AJAX?(如何發(fā)送“amp;?通過 AJAX 的(和號(hào))字符?)

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

            <tfoot id='E0zJh'></tfoot>
          1. <small id='E0zJh'></small><noframes id='E0zJh'>

                <bdo id='E0zJh'></bdo><ul id='E0zJh'></ul>
                  <tbody id='E0zJh'></tbody>

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

                  本文介紹了如何發(fā)送“&amp;"?通過 AJAX 的(和號(hào))字符?的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我想用 JavaScript 的 POST 方法發(fā)送一些變量和一個(gè)字符串.

                  I want to send a few variables and a string with the POST method from JavaScript.

                  我從數(shù)據(jù)庫(kù)中獲取字符串,然后將其發(fā)送到 PHP 頁(yè)面.我正在使用 XMLHttpRequest 對(duì)象.

                  I get the string from the database, and then send it to a PHP page. I am using an XMLHttpRequest object.

                  問題是字符串多次包含字符&,而PHP中的$_POST數(shù)組把它看成是多個(gè)鍵.

                  The problem is that the string contains the character & a few times, and the $_POST array in PHP sees it like multiple keys.

                  我嘗試將 & 替換為 &replace() 函數(shù),但它似乎沒有做任何事情.

                  I tried replacing the & with & with the replace() function, but it doesn't seem to do anything.

                  誰(shuí)能幫忙?

                  javascript 代碼和字符串如下所示:

                  var wysiwyg = dijit.byId("wysiwyg").get("value");
                  var wysiwyg_clean = wysiwyg.replace('&','&');
                  
                  var poststr = "act=save";
                  
                  poststr+="&titlu="+frm.value.titlu;
                  poststr+="&sectiune="+frm.value.sectiune;
                  poststr+="&wysiwyg="+wysiwyg_clean;
                  poststr+="&id_text="+frm.value.id_text;
                  
                  xmlhttp.open("POST","lista_ajax.php",true);
                  xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
                  xmlhttp.send(poststr);
                  

                  字符串是:

                   <span class="style2">&quot;Busola&quot;</span>
                  

                  推薦答案

                  你可以使用 encodeURIComponent().

                  它將轉(zhuǎn)義所有不能在 URL 中逐字出現(xiàn)的字符:

                  It will escape all the characters that cannot occur verbatim in URLs:

                  var wysiwyg_clean = encodeURIComponent(wysiwyg);
                  

                  在此示例中,與字符 & 將被替換為轉(zhuǎn)義序列 %26,這在 URL 中有效.

                  In this example, the ampersand character & will be replaced by the escape sequence %26, which is valid in URLs.

                  這篇關(guān)于如何發(fā)送“&amp;"?通過 AJAX 的(和號(hào))字符?的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會(huì)等待 ajax 調(diào)用完成)
                  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 無法加載,請(qǐng)求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  Is it possible for XHR HEAD requests to not follow redirects (301 302)(XHR HEAD 請(qǐng)求是否有可能不遵循重定向 (301 302))
                  NETWORK_ERROR: XMLHttpRequest Exception 101(NETWORK_ERROR:XMLHttpRequest 異常 101)
                  XMLHttpRequest 206 Partial Content(XMLHttpRequest 206 部分內(nèi)容)
                    <bdo id='VC0dW'></bdo><ul id='VC0dW'></ul>
                    <i id='VC0dW'><tr id='VC0dW'><dt id='VC0dW'><q id='VC0dW'><span id='VC0dW'><b id='VC0dW'><form id='VC0dW'><ins id='VC0dW'></ins><ul id='VC0dW'></ul><sub id='VC0dW'></sub></form><legend id='VC0dW'></legend><bdo id='VC0dW'><pre id='VC0dW'><center id='VC0dW'></center></pre></bdo></b><th id='VC0dW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='VC0dW'><tfoot id='VC0dW'></tfoot><dl id='VC0dW'><fieldset id='VC0dW'></fieldset></dl></div>
                      <tbody id='VC0dW'></tbody>

                    • <legend id='VC0dW'><style id='VC0dW'><dir id='VC0dW'><q id='VC0dW'></q></dir></style></legend>

                            <tfoot id='VC0dW'></tfoot>
                          1. <small id='VC0dW'></small><noframes id='VC0dW'>

                            主站蜘蛛池模板: 国产精品久久一区 | 一区二区三区精品视频 | 青草视频在线播放 | 亚洲精品久久 | 国产91免费 | 免费视频毛片 | 国产999视频 | www色| 国产盗摄一区二区三区 | 国产黄色一区 | 91白浆| av福利在线| 黄色三级av | av免费观看在线 | 久久99九九 | 久久98 | 波多野结衣一区二区三区 | 久草久草| 天天操天天看 | 夜夜操影院| 日日操日日射 | 亚洲欧美专区 | 好色影院| 东方成人av | 日韩av不卡在线观看 | 欧美一级淫片免费视频魅影视频 | 久久精品一区二区三区不卡牛牛 | 黄色激情视频在线观看 | 一区二区三区精品 | 中文字幕99 | 精品一区二区在线播放 | 97超碰资源总站 | 国产第五页 | 久热在线| 国产欧美日韩一区 | 中文字幕二区 | 欧美一级欧美三级在线观看 | 中国少妇xxxxhd做受 | 亚洲免费黄色 | 欧美一区二区三区在线观看视频 | 黄色片中文字幕 |