我的代码是
$(document).ready(function () {
dojo.require("dojo.data.ItemFileWriteStore");
dojo.connect(dijit.byId('_department_id'), 'onChange', function (val) {
alert("Department" + val);
$.getJSON('${desigForDept}', {
paramID: val
}, function (data) {
alert("Department");
poplulateDesigItems(data);
});
});
});
答案 0 :(得分:-1)
这适用于IE8。这是'纯'DOM方式(即不一定是dijit方式)。
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js.uncompressed.js'></script>
<select id="_department_id">
<option>1</option>
<option>2</option>
<option>3</option>
</select>
<script>
dojo.ready(function () {
console.log("ready");
var id = "_department_id";
var el = document.getElementById(id);
dojo.connect(el, 'change', function (val) {
alert("Department" + val);
});
});
</script>