write a Java script function that grabs the style of a <p> element and change it to some other style in the java script onmouseover and return to its initial style onmouseover event
Answers
Answered by
2
Answer:
const element = document.queryselector('p');
element.addEventListener('mouseover', function() {
element.style.color = 'White';
});
element.addEventListener('mouseleave', function() {
element.style.color = 'Black';
});
Hope this helps - Have a great day!
Similar questions