Javascript Dojo不为我工作
我的道具坏了。我什么都试过了 代码如下:Javascript Dojo不为我工作,javascript,dojo,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/d
<!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>
dojo.addOnLoad(函数(){
log(“页面就绪,可以在此之后随时修改DOM”);
});
将代码放入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>
dojo.addOnLoad(函数(){
log(“页面就绪,可以在此之后随时修改DOM”);
});
具有
src
属性的脚本标记也不能包含代码,除非使用 错误消息?试试萤火虫?您只是没有看到控制台输出吗?是的,没有看到任何控制台输出。没有错误消息。谢谢,但是console.log的输出到哪里去了?在您的示例中,它实际上从未被调用过。。。浏览器完全忽略了它。是的,我知道。但是对于firebug,我使用console.debug将输出获取到控制台。console.log去哪了?@pfdevil——同一个地方:-)