dojo之Helloword
<html> <head>
<title> Dojo: Hello World! </title>
<script type= "text/javascript " src= "js/dojo/dojo.js ">
dojo.require( "dojo.event.* ");
dojo.require( "dojo.widget.* ");
dojo.require( "dojo.widget.Button ");
dojo.addOnLoad(init);
function helloPressed()
{
alert( 'You pressed the button ');
}
function init()
{
var helloButton = dojo.widget.byId( 'helloButton ');
dojo.event.connect(helloButton, 'onClick ', 'helloPressed ');
}
</script>
</head>
<body>
<button dojoType= "Button " widgetId= "helloButton "> Hello World! </button>
</body>
</html>
为什么上面的代码不行运行啊,在线等待