cxxjackie 发表于 2022-8-17 20:29
new Event的bubbles默认值是false,而真实事件的bubbles通常都是true,碰到这种委托的确实得改bubbles, ...
ok啦
已经新添加到文章里了!
Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
at <anonymous>:1:4
Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.
at <anonymous>:1:4
在cc.dispatchEvent(focus)的时候报这个错 怎么解决大佬{:4_88:}
Thedust 发表于 2022-8-18 14:22
Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type ' ...
cc.dispatchEvent(focus)中的focus不是Event
最基本的focus事件要写成这样new Event("focus")
is not a function at <anonymous>:1:5 这个问题怎么解决大佬们
hu86a3063648 发表于 2022-8-31 02:23
is not a function at :1:5 这个问题怎么解决大佬们
document.querySelectorAll返回的是一个包含所有符合选择器条件的元素的数组
因此要写成这种形式 xxx[数组下标].dispatchEvent
大佬,有没有案例类的登录网页拿来练练手。期待 这期视频教程啊,很实用
cxxjackie 发表于 2021-11-11 20:28
因为之前接触过几个react的页面,我做那个全局属性的脚本时又发现了不少东西,然后翻了一些文章+自己总结 ...
这个也不太懂,能否根据实际多来点例子。。
看了让人获益良多。
szzxc 发表于 2023-7-25 12:55
这个也不太懂,能否根据实际多来点例子。。
论坛里很多啊,随便搜搜就能找到一堆这类问题的,你可以用他们的链接研究看看。