Last active
March 27, 2018 02:50
-
-
Save ruter/9b05f0f0ce845e044d99a53c7b784eb1 to your computer and use it in GitHub Desktop.
使用 jQuery 的 param() 方法创建数组或对象的序列化表示,该序列化值可在进行请求时在 URL 查询字符串中使用,可避免如 '#' 和 '%' 等特殊字符的出现可能导致的问题 #JavaScript #jQuery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var params = {name: 'Lucy', addr: 'Street#233'} | |
var res = $.param(params) | |
console.log(res) // name=Lucy&addr=Street%23233 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment