[thelist] CSS from within Javascript
James Spahr
james at designframe.com
Fri Aug 4 11:37:33 CDT 2000
on 8/4/00 12:13 PM, Ed Nolan at ed at nolans.net wrote:
> Anybody know how to write a JavaScript line that includes a call to CSS?
>
> I'm quickly finding that calls to CSS from within JavaScript tags are
> ineffective.
> For example, the JavaScript command below:
>
> document.write("<span" + " " + "id="date">");
>
> Should, supposedly, write a CSS tag:
>
> <span id="date">
document.write("<span" + " " + "id=\"date\">");
document.write("<span id=\"date\">"); // why not do this?
escape the quotes, don't encode them. Or:
document.write('<span" + ' ' + 'id="date">');
James.
More information about the thelist
mailing list