This is an example of how to change the background color using the OnClick and Hover using javascript.
Please share your comments and feedback.Thanks.Please subscribe my updates via email.
Javascript Function
<script language="JavaScript">
function changebg(color){
document.bgColor = color;
}
</script>
function changebg(color){
document.bgColor = color;
}
</script>
Mouseover Change Bg Color
<p><a href="#" onMouseOver="javascript:changebg('#EB2525')">Mouseover <strong>Red</strong></a></p>
MouseClick Change Bg Color
<p><a href="#" onclick="javascript:changebg('#000099')">MouseClick <strong>Blue</strong></a></p>
No comments:
Post a Comment