?
This document uses PHP Chinese website manual Release
JScript? | 語言參考 |
對 String 對象編碼以便它們能在所有計算機上可讀,
escape(charString)
必選項 charstring 參數(shù)是要編碼的任意 String 對象或文字。
escape 方法返回一個包含了 charstring 內(nèi)容的字符串值( Unicode 格式)。所有空格、標點、重音符號以及其他非 ASCII 字符都用 %xx 編碼代替,其中 xx 等于表示該字符的十六進制數(shù)。例如,空格返回的是 "%20" 。
字符值大于 255 的以 %uxxxx 格式存儲。
注意 ? escape 方法不能夠用來對統(tǒng)一資源標示碼 (URI) 進行編碼。對其編碼應(yīng)使用 encodeURI 和encodeURIComponent 方法。
版本 1
encodeURI 方法 | encodeURIComponent 方法 |String 對象 | unescape 方法
應(yīng)用于: Global 對象