this is kind of rudimentary, but you get the idea...
[php]
<style>
p.red {
color: red;
}
p.black {
color:black;
}
</style>
<script language="javascript">
function change(thing,newClass) {
thing.className = newClass;
}
</script>
<p class="black" onmouseover="change(this,'red')" onmouseout="change(this,'black')">
some text
[/php]
[web] How to refer to a paragraph in HTML
Tesseract, I appricate the suggestion, but I don't know php. Can you try to explain it so I can understand what it does or how to implement in a notepad html file?
That code is pure HTML and javascript. I presume it was wrapped in [php] tags because Tesseract thought it would make it look like code. (Should use source tags instead.)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement