开发者

dojo query to get parents of all inputs

I'm used to the jQuery style of selecting, which would be fairly easy in this case

$("tbody td:has(input)").click(...);

But dojo seems to be using only regular CSS selectors, which开发者_开发问答 means I can't get a parent element.

I've tried to do this:

dojo.query("tbody td input").parentNode.onclick(...);

But that doesn't seem to work. Any ideas?


How about:

dojo.query("tbody td:contains(input)").onclick()


The latest versions of Dojo have a module to extend dojo.query: traverse. It contains also parent function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜