我正在尝试自定义模态登录表单。
如何将data-dojo-attach-point
ID应用于document.getElementById('id');
,如下所示,以获取按钮ID?
HTML
<div style="text-align:center;">
<button data-dojo-type="dijit/form/Button"
data-dojo-attach-event="onClick:toggleEditing"
data-dojo-props="label:'${i18n.labels.startEditing}','class':'success'"
data-dojo-attach-point="toggleBTN">
</button>
</div>
的Javascript
<script>
// Get the modal
var modal = document.getElementById('id01');
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>