久久久久久久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é)習吧!

                  問題描述

                  我想用 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標頭) - 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精品国产 | 美女视频三区 | 久久综合久 | 国产一区不卡 | 99re6在线 | 91看片免费版 | 精产国产伦理一二三区 | 男人天堂99| 一区二区中文字幕 | 久久国产精品网 | 午夜视频免费在线观看 | 久久精品欧美一区二区三区麻豆 | 国产视频一区在线 | 国产美女视频黄 | av中文字幕在线观看 | 亚洲免费视频一区 | 精品国产乱码久久久久久久久 | 一级久久久久久 | 日韩在线中文 | 365夜爽爽欧美性午夜免费视频 | 视频在线亚洲 | 视频在线一区二区 | 精品一区在线免费观看 | 韩国毛片一区二区三区 | 久久国产婷婷国产香蕉 | 亚洲精品一区国语对白 | 日韩一区中文字幕 | av在线视 | 一区欧美 | 人人干在线视频 | 成人精品一区二区 | 欧美日韩一区二区视频在线观看 | 午夜影院黄 | 欧美极品视频在线观看 | 日韩aⅴ视频 | 国产网站在线播放 | 国产jizz女人多喷水99 | 综合激情网| 91在线视频免费观看 | 99热首页 |