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

Javascript examples for DOM:Quiz

Description

Add onmouseover event to <span> element and 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>/*  w  ww .  java2s  .  c  o m*/
</html>

Related Tutorials