Discussion: js write a <hr>
Afficher un message
Vieux 11/09/2007, 18h22   #15
Blinky the Shark
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: js write a <hr>

GreyWyvern wrote:
> And lo, GreyWyvern didst speak in alt.www.webmaster:
>
>> So, in order to get it to validate, you need to tell the parser that
>> what's inside the script element is special. You can do this in one
>> of two ways, but there are caveats about both.
>>
>> 1) Simply use SGML comments to hide the code:

>
> [snip]
>
>> 2) Use the XML <![CDATA[ ... ]]> structure to mark the boundaries of
>> your code.

>
> [snip]
>
> There is, of course, a third option which I have forgotten, and that
> is to use an external javascript file.
>
>
><script type="text/javascript" src="writehr.js"></script>
>
> In file: writehr.js document.write("<hr />" + "Today's alleged
> Yogi-ism:");
>
>
> Although the same caveat about document.write() not working when using
> the text/xml or application/xhtml+xml MIME-types still applies.


Thanks. I think I will play with this rather than rewriting the whole
site or giving up.


--
Blinky RLU 297263
Killing all posts from Google Groups
The Usenet Improvement Project:
http://improve-usenet.org <----------- New Site Aug 28
  Réponse avec citation
 
Page generated in 0,70527 seconds with 9 queries