CODE
change.html
<html>
<head>
<title> Change Color</title>
<script>
function ChangeColor(){
var x = document.getElementById('changecolor');
x.style.fontSize="25px";
x.style.color="red";
}
</script>
</head>
<body>
<p id="changecolor"> WELCOME</p>
<button type="button" onclick="ChangeColor()">Change</button>
</body
</html>
Try it Yourself »OUTPUT
WELCOME
No comments:
Post a Comment