问题
When I load this script with IE8, I've got exception Object does not support this property or method
. But it works with other browsers.
I use dijit 1.3.1 and I don't understand.
dojo.addOnLoad(init);
var DG;
var datas;
function init(){
DG = dijit.byId("DG");
}
I've had parseOnload: true but it changes anything.
<script type="text/javascript" src="dojo/dojo.js"
djConfig="parseOnLoad: true">
</script>
回答1:
This migth probably not fix the problem, but the function init()
is used before it was declared.
Try this:
var DG;
var datas;
function init(){
DG = dijit.byId("DG");
}
dojo.addOnLoad(init);
Does it work?
来源:https://stackoverflow.com/questions/13365287/dijit-byid-doesnt-work-on-ie8-with-dojo-addonload