如题,我可以如下为button加上onclick的监听事件。
this.btn_CloseWebiFrame = laya.utils.Browser.window.document.createElement('button');
this.btn_CloseWebiFrame.onclick = () => {
console.log("onclick");
};
oncontextmenu也没有问题。[code]this.img_closeWebiFrame.oncontextmenu = () => {
console.log("aaa4");
this.img_closeWebiFrame.src = "SlotGameTemplate/phone_public_setting_source/phone_btn_setting_page_back_up.png";
};[/code]但是 ontouchstart,ontouchend,ontouchcancel,onfocusout 都收到无法监听事件的回应,这是什么原因呢?
附件:
ErrorSample.zip