假设有以下div
<div class="group1 section1" />
<div class="group1 section2" />
<div class="group1 section3" />
<div class="group1 section4" />
<div class="group2 section1" />
<div class="group2 section2" />
<div class="group2 section3" />
<div class="group2 section4" />
现在我必须通过Dojo选择所有4组1 div,如何解决这个问题
答案 0 :(得分:1)
使用dom.query('.group1');
require([
'dojo/query'
'dojo/dom',
'dojo/domReady!'
], function (dom) {
var group1 = dom.query('.group1');
});