javascript - Change jquery mouseover to window mouseover -


i want change (which gets span name in table):

$('span').on('mouseover', function () {     if (this.id.match(/_zuserid/)) {         alert(this.id);     } } 

to use:

window.onmouseover=function(e) {     ...     ... } 

but couldn't figure out how span name e.target. don't know put after e.target span name.

here jsfiddle example.

window.onmouseover=function(e) {     if (e.target.id=='myspan') {         alert(e.target.id);     } } 

Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

c++ - Can not find the "fiostream.h" file -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -