Answer: In JavaScript, the backslash (\) is an escape character.
<script type="text/javascript">
<!--
document.write("The "escape" character");
//-->
</script>
As soon as the browser encounters the first double quote, it will think that the string has finished. Further, it will result in an error because it will be expecting the closing bracket.
<script type="text/javascript">
<!--
document.write("The \"escape\" character");
//-->
</script>
Thanks and Regards
Akiii
Source: quackit | |
Alert Moderator