开发者

did javascript or jquery has method as Server.UrlEncode() in asp.net

开发者 https://www.devze.com 2023-04-06 19:20 出处:网络
did javascript or jquery has method as Se开发者_高级运维rver.UrlEncode() in asp.net eg:when using

did javascript or jquery has method as Se开发者_高级运维rver.UrlEncode() in asp.net

eg:when using

  $.get("a.aspx?pk=1&k="+kvale, function(data) {
            dosth(data);
            });

url must encode


You can convert any string to a URL-encoded string (suitable for transmission as a query string or, generally speaking, as part of a URL) using the JavaScript functions escape, encodeURI and encodeURIComponent.

escape('https://www.stackoverflow.com/?wow.php')
"https%3A//www.stackoverflow.com/%3Fwow.php"

Source: http://www.javascripter.net/faq/escape.htm

0

精彩评论

暂无评论...
验证码 换一张
取 消