Bug Tracker

Opened 7 years ago

Closed 7 years ago

#12142 closed bug (invalid)

选择器错误

Reported by: wangy567@… Owned by:
Priority: low Milestone: None
Component: selector Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

Description

<ul><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="1" >开发部<ul><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="4" >研发一部<ul><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="42" >研发一部-1-1</li></ul></li><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="5" >研发二部<ul><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="28" >研发二部1</li></ul></li><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="47" >开发三部<ul><li style="cursor:pointer;" onclick="GetNodes(this,event)" value="49" >开发三部_2</li></ul></li></ul></li></ul>

上面的代码是我的测试代码。

$("li [value=1]") 不能获取到我要的节点信息 返回值是null 除了value=1以外的节点信息都可以正常获取 我工作的时候用的是1.4.2版本,我测试过1.7.2 也存在这个问题。希望你们能够及时解决这个bug。谢谢。

Change History (1)

comment:1 Changed 7 years ago by sindresorhus

Component: unfiledselector
Priority: undecidedlow
Resolution: invalid
Status: newclosed

There shouldn't be a space with the tag name and the attribute selector. Try this $("li[value=1]")

Note: See TracTickets for help on using tickets.