PROGRAM IN JAVASCRIPT TO CHANGE THE BACKGROUND COLORS ON A PAGE

<html>

<head>
    </head>

<body>
<script type = "text/javascript">

function paintIt(){
    color = prompt("Enter the color you want on the Background???");
    document.body.style.backgroundColor = color;
}
function stoppaintIt(){
alert("THANK YOU  FOR PAINTING ME!!!");
}
</script>
<form>
<input type = "button" value = "Paint Me" onclick ="paintIt()"><br>
<input type = "button" value = "stop paint" onclick ="stoppaintIt()">
</form>
</body>
</html>

No comments:

Post a Comment