ASP URLEncode 方法
定義和用法
URLEncode 方法把 URL 編碼規(guī)則應(yīng)用到指定的字符串。
Syntax
Server.URLEncode(string)
參數(shù) | 描述 |
---|---|
string | 必需。要編碼的字符串。 |
實(shí)例
<% response.write(Server.URLEncode("http://chabaoo.cn")) %>
輸出
http%3A%2F%2Fwww%2Ew3school%2Ecom%2Ecn
URLEncode 方法把 URL 編碼規(guī)則應(yīng)用到指定的字符串。
Server.URLEncode(string)
參數(shù) | 描述 |
---|---|
string | 必需。要編碼的字符串。 |
<% response.write(Server.URLEncode("http://chabaoo.cn")) %>
輸出
http%3A%2F%2Fwww%2Ew3school%2Ecom%2Ecn