![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
JQ
文章平均质量分 66
Carry-Lee
这个作者很懒,什么都没留下…
展开
-
点击显示当前class
Document .d1{ border-radius:50%; } $("#btn1").on("click","div",function(){ $(this).siblings().removeClass(); $(this).addClass("d1"); });原创 2016-09-12 09:48:13 · 425 阅读 · 0 评论 -
获取当前点击的是哪个元素
用点击li元素为例 获取当前点击的元素 1 2 3 4 5 //第一种 var doms = document.querySelectorAll('ul li'); for (var i = 0; i < doms.length; i++) { !function(dom,index) { dom原创 2016-07-13 00:48:43 · 15520 阅读 · 0 评论