html頁面往后台傳數據,拼接的url參數丟失問題


比如:

urls=https://i.cnblogs.com/EditArticles.aspx?opt=1&haha=中國

請求的url

http://www.w3school.com.cn/jsref/jsref_encodeURIComponent.asp需要將urls整個傳入后台,這時候可能會存在丟失部分urls參數

需要用到encodeURIComponent函數

window.href="http://www.w3school.com.cn/jsref/jsref_encodeURIComponent.asp&urls=" + encodeURIComponent(urls)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM