Calling CSS in Javascript


in HTML you can call CSS

<link rel="stylesheet" type="text/css" href="style.css" />

<tr><td class="cssHere">Display</td></tr>

can you even call CSS in javascript?

document.writeln("<tr><td class="cssHere">" + Display + "</td></tr>");

if so how do you even call the "style.css"



document.write('<style>#id { display:none }</style>');



document.write('<style>#id { display:none }</style>');

what is #id
does this mean I can NOT call a .css file?


Yes you can call a CSS link. Just put it in there in place of what I put.


As an example, in your CSS page you might have:
.sml { font-size:12px; color:#F00; }

In your document you can write
document.writeln("<tr><td class="sml">" + Display + "</td></tr>");

and the text in Display will be 12px, red when the page renders.