Core function | |
Implemented in | Navigator 2.0, LiveWire 1.0 |
escape("string")
string | A string in the ISO-Latin-1 character set. |
escape
function is a top-level JavaScript function that is not associated with any object. Use the escape
and unescape
functions to add property values manually to a URL.* @ - _ + . /
"%26"
:escape("&")Example 2. This statement
escape("The_rain. In Spain, Ma'am")returns
"The_rain.%20In%20Spain%2C%20Ma%92am":Example 3. In the following example, the value of the variable
theValue
is encoded as a hexadecimal string and passed on to the request
object when a user clicks the link:<A HREF=\Q"mypage.html?val1="+escape(theValue)\Q)>Click Here</A>
unescape
Last Updated: 10/31/97 16:38:00