Encoding a URL.

Posted by Puneet20884 under JavaScript category on | Views : 2034
Encoding a URL javascript can be done by the usage of its inbuilt function


we need to encode sometimes the URL that the javscript doesn't take.
So to encode a URL we need to use this function,
the simple code goes as:

document.write(encodeURI('gr8 puneet.aspx?pra=tål&pcar=great'));

the output will be


Comments or Responses

Login to post response