Blogger Information
Blog 33
fans 0
comment 1
visits 43075
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
关于js和jquery的细微关系
萝卜温的博客
Original
671 people have browsed it

在绑定事件时,要注意$(this)的指向问题!通过onclick属性绑定事件时通常需要传入this对象,然后用$(this)转为JQuery对象即可,this 等价于 $(this)[0]!

通过$(selector).click();绑定的事件处理函数中的$(this)指向事件源

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post