0
我想停止点击复选框的事件在这个按钮下的函数调用停止复选框单击窗体其他功能
//Checkbox
<label id="lblsetrefmodule" for="chksetreflayout" class="lbl-disable">
<input id="chksetreflayout" class="data_checkbox" onchange="RefLayoutDisplay();" type="checkbox" style="display:none; margin-right: 8px;" disabled="disabled">Set Reference Module Layout
</label>
//Button
<div class="detail-view" id="detail-view-id"><a id="detailview" onclick="get_fields('DetailView')">Detail View</a></div>
get_fields(name){
//I want to stop checkbox click for full execution of this function
code
//enable that click
}
您可以禁用该复选框可以禁用该复选框在get_fields执行期间,然后重新启用它。它应该禁用复选框的点击事件。 – Runcorn
@Runcorn是的,它可以做但是我已经禁用启用,对于某些条件,所以它会太复杂,我禁用启用。 –
在这种情况下,单击事件将永远不会被触发,因为它已处于禁用状态。这不是你想要的吗? – Runcorn