Possible Duplicate:
How to select html nodes by ID with jquery when the id contains a dot?
我有一个网站,包含类似的元素:
<p id="root.SomeCoolThing">Some Cool Thing</p>
我不能 Select jQuery为$('#root.SomeCoolThing')
的段落,因为jQuery认为SomeCoolThing
是id="root"
元素的类.
如何使用jQuery Select 此元素?我想避免这样的建设:
$(document.getElementById('root.SomeCoolThing'))