傳回已編碼成有效 Uniform Resource Identifier (URI) 的字串。
function encodeURI(URIString : String) : String
- URIString
-
必要項。一個代表編碼的 URI 的字串。
encodeURI 方法會傳回已編碼的 URI。如果將結果傳給 decodeURI,就會傳回原始字串。encodeURI 方法不會對下列字元進行編碼:":"、"/"、";" 及 "?"。請使用 encodeURIComponent 來對這些字元進行編碼。
5.5 版
參考
decodeURI 方法
decodeURIComponent 方法