Write the necessary Javascript code to change color of the text in a paragraph with an id of "paragraph 1" to red when the user types in a field with an ID of "my field."
Coding
<!DOCTYPE html>
<html>
<head>
<Title>Simple Color change </Title>
</head>
<body>
<p id="paragraph1">Here is the Hello World!</p><!--
Here is the Paragraph with paragraph1 id -->
<button id="myfield" onclick="changeColor()" >Click
me</button><!-- Here is the button myfield -->
<script>
function changeColor() {
document.getElementById("paragraph1").style.color = "Red";//change
property here
}
</script>
</body>
</html>
output:

if you still have any Problem regarding this question please comment and if you like my code please appreciate me by thumbs up thank you.........
Write the necessary Javascript code to change color of the text in a paragraph with an...