dojotype
属性を使用したhtmlボタンがあります:
<button id="btnSearchEmployees" dojotype="dijit.form.Button">
Search
</button>
そして、jQueryを使用してこのボタンのクリックイベントを処理しようとしています。
$("#btnSearchEmployees").click(function() {
alert("test");
});
しかし、それは機能していません。dojotype
属性を削除すると、正常に機能します。
<button id="btnSearchEmployees"> Search </button>
どうすればこれを回避できますか?
編集:これが道場の変更点です:
<span class="dijit dijitReset dijitInline dijitButton" role="presentation" style="width: 70px;" widgetid="btnSearchEmployee">
<span class="dijitReset dijitInline dijitButtonNode" data-dojo-attach-event="ondijitclick:_onClick" role="presentation">
<span class="dijitReset dijitStretch dijitButtonContents" data-dojo-attach-point="titleNode,focusNode" role="button" aria-labelledby="btnSearchEmployee_label" tabindex="0" id="btnSearchEmployee">
<span class="dijitReset dijitInline dijitIcon dijitNoIcon" data-dojo-attach-point="iconNode"></span><span class="dijitReset dijitToggleButtonIconChar">?</span>
<span class="dijitReset dijitInline dijitButtonText" id="btnSearchEmployee_label" data-dojo-attach-point="containerNode">Search</span>
</span>
</span>
<input type="button" value="" class="dijitOffScreen" tabindex="-1" role="presentation" data-dojo-attach-point="valueNode">
</span>