Javascript的URL如何像C#中UrlEncode和UrlDecode一样使用?
javascript函数的方法:
encodeURI("url地址")//编码
decodeURI("url地址")//解码
asp.net的方法:
Server.UrlEncode("url地址")//编码
Server.UrlDecode("url地址")//解码
ps:可以用js编码.net解码.也就是它们编码解码方式是一样的.它们的返回值都是编码或解码后的URL字符串.
但行好事,莫问前程。
javascript函数的方法:
encodeURI("url地址")//编码
decodeURI("url地址")//解码
asp.net的方法:
Server.UrlEncode("url地址")//编码
Server.UrlDecode("url地址")//解码
ps:可以用js编码.net解码.也就是它们编码解码方式是一样的.它们的返回值都是编码或解码后的URL字符串.