jquery获取的id含有特殊符号怎么办
我的id里有[]或.之类的符号,怎么办?或者带有命名空间的xml标签带有:怎么办?
A:用\\来转义如<div id="id[1]"></div>
$("#id\\[1\\]")
转自http://www.jb51.net/article/40454.htm
相关推荐
STPace 2020-05-25
owilson 2020-01-02
赵家小少爷 2019-12-17
heshanking 2019-10-29
Passerby 2019-10-28
生活随笔 2015-03-03
Abel 2015-06-01
adminming 2015-03-03
不断攀登的梦想 2012-11-12
xiefei0 2011-07-13
echoright晓戈 2011-11-21
comeonxueRong 2010-02-11
jiabinxu 2015-07-09
htmlgood 2015-01-19
hhhkhhh 2015-01-06
liusslove 2011-03-21