开发者

dojo query does not work on IE7 but does on IE8 and other browsers?

dojo.query("#foo #bar") which works as expected in FF, Safari, Chrome and IE8, returns an empty list in IE7.

I'm actually searching for a div with id = bar inside another div with开发者_StackOverflow id = foo.

Did I miss something in my query or is this a known issue in IE7??

Thanks Jeff


Because ID's are unique you shouldn't ever had to query for two at once. So either modify your query and have a single ID, or, if you need multiple elements with the same 'id', use a class.

For the second option, you would then change your query to dojo.query('.bar', dojo.byId('foo')), which returns elements with class 'bar' that are a child of the element with id 'foo'.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜