道场不适合我

pfd*_*ers 2 javascript dojo

我不能让我的道场工作.我已经尝试了一切.

这是代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js">


    dojo.addOnLoad(function(){
    console.log("page ready, can modify DOM anytime after this");

});
</script>

</head>
<body>

</body>
</html>
Run Code Online (Sandbox Code Playgroud)

Sea*_*ira 6

获取代码并将其放在dojo脚本标记之后的另一个脚本标记中:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js"></script>
<script type="text/javascript">
dojo.addOnLoad(function(){
    console.log("page ready, can modify DOM anytime after this");
});
</script>
Run Code Online (Sandbox Code Playgroud)

src除非您使用类似John Resig的hack,否则带有属性的脚本标记也不能包含代码.