久久久久久久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 的(和號)字符?

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

          <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 的(和號)字符?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

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

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

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

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

                  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.

                  誰能幫忙?

                  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 的(和號)字符?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Browser waits for ajax call to complete even after abort has been called (jQuery)(即使在調(diào)用 abort (jQuery) 之后,瀏覽器也會等待 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 無法加載,請求的資源上不存在“Access-Control-Allow-Origin標(biāo)頭) - IT屋-程序員軟件開發(fā)技術(shù)分
                  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 部分內(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'>

                            主站蜘蛛池模板: 久久久久久久一区二区三区 | 国产成人精品一区二 | 久久在线精品 | 亚洲欧美日韩精品久久亚洲区 | 亚洲综合一区二区三区 | 中文字幕在线观看国产 | 欧美三级成人理伦 | 国产香蕉视频 | 欧美中文字幕一区二区三区 | 特黄毛片 | 国产精品欧美一区二区三区不卡 | 中文字幕在线观看第一页 | 男女羞羞视频在线看 | 视频精品一区 | 午夜精品在线观看 | 日韩成人在线视频 | 99精品免费久久久久久久久日本 | 日韩国产精品一区二区三区 | 国产精品无码专区在线观看 | 国产精品久久久 | 久久99精品久久久久久 | 久久精品欧美一区二区三区不卡 | 国产精品国产 | 国产在视频一区二区三区吞精 | 亚洲精品一区二区三区在线 | 亚洲免费三区 | av一区在线 | 久久精品亚洲欧美日韩精品中文字幕 | 日本精品视频 | www天天操 | 波多野结衣一区二区 | 国产一级片久久久 | 在线观看成人小视频 | 国产精品国产三级国产aⅴ原创 | 日本福利视频免费观看 | 综合久久av| 日本亚洲精品成人欧美一区 | 成人精品一区二区三区中文字幕 | 国产精品视频yy9299一区 | 黄色成人在线观看 | 男人天堂社区 |