参考资料:
http://www.jb51.net/article/22880.htm
例如:
1 2 3 4 |
encodeURI("http://baidu.com/?a=b&c=d") // 输出: "http://baidu.com/?a=b&c=d" encodeURIComponent("http://baidu.com/?a=b&c=d") // 输出: "http%3A%2F%2Fbaidu.com%2F%3Fa%3Db%26c%3Dd" |
DevOps
参考资料:
http://www.jb51.net/article/22880.htm
例如:
1 2 3 4 |
encodeURI("http://baidu.com/?a=b&c=d") // 输出: "http://baidu.com/?a=b&c=d" encodeURIComponent("http://baidu.com/?a=b&c=d") // 输出: "http%3A%2F%2Fbaidu.com%2F%3Fa%3Db%26c%3Dd" |