Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is the difference unescape() and escape()?
What is the difference unescape() and escape()?
✍: Guest
These are similar to the decodeURI() and encodeURI(), but escape() is used for only portions of a URI:
<script type="text/javascript">
var myvalue = "Sir Walter Scott";
document.write("Original myvalue: "+myvalue);
document.write("<br />escaped: "+escape(myvalue));
document.write("<br />uri part: \"&author="+escape(myvalue)+"\"");
</script>
If you use escape() for the whole URI... well bad things happen.
<script type="text/javascript">
var uri = "http://www.google.com/search?q=sonofusion Taleyarkhan"
document.write("Original uri: "+uri);
document.write("<br />escaped: "+escape(uri));
</script>
2011-08-23, 4578👍, 0💬
Popular Posts:
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
How To Write a Query with a Right Outer Join? - Oracle DBA FAQ - Understanding SQL SELECT Query Stat...
How can I execute a PHP script using command line? Just run the PHP CLI (Command Line Interface) pro...
What print out will the folloging code produce? main() { char *p1=“name”; char *p2; p2=(char*)malloc...
Is Session_End event supported in all session modes ? Session_End event occurs only in “Inproc mode”...