会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
ttweixiao9999
不要轻视他人,每个人都有我们值得学习的地方 Don't look down on others, everyone has something to learn from
博客园
首页
新随笔
联系
订阅
管理
2020年12月5日
javascript 给所有相同属性元素添加同一事件(javascript add the same event to all the same properties)
摘要: 经常遇到要给 html 中所有相同属性的元素添加同一个点击事件, 这里, 我需要给所有 type 属性为 "radio" 的 input 元素添加上相同的点击事件, 具体实现的 javascript 代码如下: // document.querySelectorAll("input[type='ra
阅读全文
posted @ 2020-12-05 19:28 ttweixiao9999
阅读(1194)
评论(0)
推荐(0)
公告