Home  >  Article  >  Web Front-end  >  JS值当前DIV的ID值的代码_javascript技巧

JS值当前DIV的ID值的代码_javascript技巧

WBOY
WBOYOriginal
2016-05-16 19:13:021170browse

在ie里,可以通过var sltid=event.srcElement.id来得到你要的id

如果要兼容,则须换一种绑定事件处理函数的方式:


[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn