I’ve searched everywhere and can’t find it. I can do it if I ID the span, using getElementById() but I don’t want to ID it.
Is there a way to change all the <span class=”highlight”> to <span class=””> without writing an ID in the SPAN tag?
Thanks!
[CODE]<html>
<head>
<style type=”text/css”>
<!—
.highlight {
BACKGROUND-COLOR: #ffffcc;
}
—>
</style>
</head>
<body>
<a href=”#” onclick=”highlightOn()”>Turn Highlight ON</a><br />
<a href=”#” onclick=”highlightOff()”>Turn Highlight OFF</a><br />
<p>
There is some text. I want to <span class=”highlight”>highlight</span> certain <span class=”highlight”>words</span>. But I want to be able to turn off and on the highlight, based on the class name “highlight”.
</p>
</body>
</html>