开发者

How to get the html object who called the onmouseover function method in JSP?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜