Opened 11 years ago
Closed 11 years ago
#10584 closed defect (duplicate)
dojo.query faild
Reported by: | milad | Owned by: | alex |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Query | Version: | 1.4.0 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
hi all, i have:
<input name="test[]" dojoType="dijit.form.ValidationTextBox" type="text">
when i run:
console.log(dojo.query('input[name=test[]]').length);
print 0 on console!,but with this command:
console.log(dojo.query('input[name^=test[]]').length);
print 1 on console. same action in 1.4 & 1.3.2
Attachments (1)
Change History (3)
Changed 11 years ago by
Attachment: | query.html added |
---|
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This specific example works with the backslash escaping, but the one in #11189 is not working, so closing this bug in favor of that one. Removing the backslash requirement is not likely to change for Dojo 1.x.
Note: See
TracTickets for help on using
tickets.
This will work if you escape [ and ], like this:
For comparison, jQuery works w/o escaping.