Add onmouseover event to <span> element, change its color - Javascript DOM

Javascript examples for DOM:Quiz

Description

Add onmouseover event to <span> element, change its color

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<span onmouseover="this.style.color='red'">Mouse over me!</span>

</body>/*from   w w w. j  a v a  2  s .com*/
</html>

Related Tutorials