<form>
<input id="b2" type="text" placeholder="Enter Name." name="name" maxlength="300">
<br>
<button id="b1" type="button name" >Submit</button>
</form>
<script>
document.getElementById("b1").hover = function() {
document.getElementById("b2").style.color="blue";
};
</script>
- Input with id
b2
, - The button with id
b1
, - Hover on
b1
, change the color onb2