为了账号安全,请及时绑定邮箱和手机立即绑定

id含有冒号的元素,jQuery如何选中?

id含有冒号的元素,jQuery如何选中?

扬帆大鱼 2018-08-10 10:10:22
页面含有一些id含有冒号的元素。<input id="opeartion:security" type="checkbox"/> <input id="opeartion:manager"  type="checkbox"/> <input id="angent:monitor"  type="checkbox"/>服务端传来的信息格式是:{"eperation:security":true,"agent:monitor":true}如何让值为true的id,设置成选中状态?通过jQuery
查看完整描述

1 回答

?
哆啦的时光机

TA贡献1779条经验 获得超6个赞

$('#a\\:b')


查看完整回答
反对 回复 2018-09-25
  • 1 回答
  • 0 关注
  • 578 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信