Share via


encodeURI 方法

更新:2007 年 11 月

傳回已編碼成有效 Uniform Resource Identifier (URI) 的字串。

function encodeURI(URIString : String) : String

引數

  • URIString
    必要項。一個代表編碼的 URI 的字串。

備註

encodeURI 方法會傳回已編碼的 URI。如果將結果傳給 decodeURI,就會傳回原始字串。encodeURI 方法不會對下列字元進行編碼:":"、"/"、";" 及 "?"。請使用 encodeURIComponent 來對這些字元進行編碼。

需求

5.5 版

套用至︰

Global 物件

請參閱

參考

decodeURI 方法

decodeURIComponent 方法