Want to do something innovative in your programming? Here, There is an example to change your background color on hover and OnClick using JavaScript.
To see Live Demo :- Click Here
To Download Script :- Click Here
Javascript Function :-
<script language="JavaScript">
function changebg(color){
document.bgColor = color;
}
</script>
Mouse Hover Change Background Color :-
<p><a href="#" onMouseOver="javascript:changebg('#EB2525')">Mouseover <strong>Red</strong></a></p>
Mouse Click Change Background Color :-
<p><a href="#" onclick="javascript:changebg('#000099')">MouseClick <strong>Blue</strong></a></p>
To see Live Demo :- Click Here
To Download Script :- Click Here
Javascript Function :-
<script language="JavaScript">
function changebg(color){
document.bgColor = color;
}
</script>
Mouse Hover Change Background Color :-
<p><a href="#" onMouseOver="javascript:changebg('#EB2525')">Mouseover <strong>Red</strong></a></p>
Mouse Click Change Background Color :-
<p><a href="#" onclick="javascript:changebg('#000099')">MouseClick <strong>Blue</strong></a></p>
0 comments:
Post a Comment