Discussion: js write a <hr>
Afficher un message
Vieux 11/09/2007, 10h35   #6
Dylan Parry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: js write a <hr>

Blinky the Shark wrote:

> document.write("<hr />" + "foo")
>
> But validation fails with a you-can't-use-a-<hr>-there error.


Try:

document.write("<hr \/>" + "foo");

When using document.write() combined with XHTML, you need to escape the
closing slashes in end tags otherwise it won't validate. It should still
/work/ okay without it though.

--
Dylan Parry
http://electricfreedom.org | http://webpageworkshop.co.uk

The opinions stated above are not necessarily representative of
those of my cats. All opinions expressed are entirely your own.
  Réponse avec citation
 
Page generated in 0,05090 seconds with 9 queries