JavaScript Reference/Javascript Properties/className
"className" Example
<source lang="javascript">
<html> <head> <script language="JavaScript">
function function1() { document.getElementById("myP").className = "myC" }
</script> <style> .myC {
font-family:verdana, arial; font-weight:bold; font-size:16px;
} </style> </head> <body>
Render this text using the myC class
</body> </html>
</source>
"className" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<a> <acronym> | | |<address> <applet> | | |<area> | | |<base> <basefont> | | | |
| |<body> || |
| |
<button> || | |
| |<dir>| | |<col> <colgroup> | | |<custom>
| | | || | |
- | | | <embed> | | |<fieldset> | | |<form> <frame> | | |<frameset> <head> | | |<hn>
|| |<html> | | |<iframe> <img> | | |<input type="button"> <input type="checkbox"> | | |<input type="file"> <input type="hidden"> | | |<input type="image"> <input type="password"> | | |<input type="radio"> <input type="reset"> | | |<input type="submit"> <input type="text"> | | | <isindex> | | | <label> |
| |<legend>- | | |<link> <listing> | | |<map> <marquee> | | |<menu> <meta> | | |<nobr> <noframes> | | |<noscript> <object> | | |
<optgroup> | | |<option>
| | |<param>
| | |