html - Bind multiple events in javascript -


i tried following change span red on mouseover , black on mouseout:

<span onmouseover="this.style.color='red' onmouseout=this.style.color='black'">mouse on me!</span> 

but not work!

how can bind more 1 event single element using javascript?

forgot quote..

<span onmouseover="this.style.color='red'" onmouseout="this.style.color='black'">mouse on me!</span>


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

android - MPAndroidChart - How to add Annotations or images to the chart -