I write a html file with some JSP in it.A html tag has a onmouseover listener.And when the mouseove开发者_开发问答r method is called by moving mouse on the tag's innerhtml, how can I get the current html tag object? BTW,The "this" pointer is not pointing to the tag element.
function dosth(){
//TODO: get the object who calls this method.
}
....
<mytag onmouseover="dosth()">innerHTML</mytag>
In above example,how can i get the mytag node ? mytag is not allowed to have an id.
<mytag onmouseover="dosth(this);">innerHTML</mytag>
The first argument sent to dosth
will be the element that called it.
精彩评论