Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Which function is used in JavaScript for URL encoding?

a) encodeURI()
b) Server.URLEncode()
c) rawurlencode()
d) UREncoding

Answer: a
Explanation: There are some built in functions in JavaScript, ASP and PHP for URL encoding. JavaScript use encodeURI() function. ASP uses Server.URLEncode() function, rawurlencode() function is used by PHP. Space is encoded as %20 by JavaScript function.

Join The Discussion