Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Roy Schestowitz
March 22, 2005, 2:16 am
rate this thread
I isolated the problematic part and put it in the following address:
Is there a way of achieving this functionality and still get it to validate?
Thanks for any help,
Roy Schestowitz wrote:
In all closing tags within the script (e.g., document.write('</P>')),
precede the slash with a backslash to "escape" it, like
document.write('<\/P>'). Otherwise, the closing tags are considered
under SGML rules to terminate the script element.
There's a lot of mistaken belief out there about what's needed to make
closing tags within scripts valid; you see a lot of stuff like
document.write('</scri'+'pt>'), perpretrated by people with a vague
idea that they need to do something special to prevent the tag from
being treated as regular HTML, but don't know the actual syntax
requirements which require escaping the slash. Once some influential
designer does it, everybody else seems to slavishly imitate them, in
- » List of tables, nowrap until end of available width
- — Next thread in » HTML Markup Language