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

Blinky the Shark wrote:
> 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.


Uh. Wait. So you're saying that this still won't validate unless I
rewrite the site?


--
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,05355 seconds with 9 queries