WMLScript escapeString() 函數
escapeString() 函數用轉義序列替換 URL 中的特殊字符,并返回結果。
語法
n = URL.escapeString(url)
成分 | 描述 |
---|---|
n | 從函數返回的字符串。 |
url | 一個字符串。 |
例子
var a = URL.escapeString("http://codew3c.com/wml/");
結果
a = "http%3a%2f%2fcodew3c.com%2fwml%2f"
escapeString() 函數用轉義序列替換 URL 中的特殊字符,并返回結果。
n = URL.escapeString(url)
成分 | 描述 |
---|---|
n | 從函數返回的字符串。 |
url | 一個字符串。 |
var a = URL.escapeString("http://codew3c.com/wml/");
a = "http%3a%2f%2fcodew3c.com%2fwml%2f"