17
用JavaScript编码URL?
如何使用JavaScript安全地编码URL,以便可以将其放入GET字符串中? var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl; 我假设您需要myUrl在第二行编码该变量?
2469
javascript
url
urlencode