是否可以将纯 HTML 组件上的事件与 DOJO 1.6 连接起来?
例如
...
<input type="radio" class="radiobutton">
<input type="radio" class="radiobutton">
...
<script type="text/javascript">
dojo.addOnLoad(function () {
var radioButtons = dojo.query(".radiobutton", this.domNode);
var func = dojo.hitch(this, hello());
dojo.connect(radioButtons[0], "onclick", func);
function hello(){
alert("Hello");
}
});
</script>