用于对按钮附加 click(单击)处理函数的代码片段
//禁用多个处理程序,因为这些处理程序可能用于帧脚本中
if(!this.instance_name_here_click_cbk) {
function instance_name_here_click(evt) {
//启动自定义代码
console.log("已单击按钮");
//结束自定义代码
}
//将事件处理程序附加到父级,并使用筛选器作为
//组件实例的ID
$("#dom_overlay_container")。on("click", "#instance_name_here", instance_name_here_click.bind(this));
this.instance_name_here_click_cbk = true;
}