Change background color


Here is the HTML:
<input type="button" onClick="changecolor('red');" value="red">
<input type="button" onClick="changecolor('green');" value="green">
<input type="button" onClick="changecolor('blue');" value="blue">
Here is the Javascript:
<script type="text/javascript">
function changecolor(color){
document.bgColor = color;
}
</script>

0 comments:

Post a Comment