Uncaught ReferenceError: function is not defined with onclick

前端 未结 3 1132
陌清茗
陌清茗 2020-11-22 05:50

I\'m trying to make a userscript for a website to add custom emotes. However, I\'ve been getting a lot of errors.

Here is the function:

fun         


        
3条回答
  •  野性不改
    2020-11-22 06:44

    If the function is not defined when using that function in html, such as onclick = ‘function () ', it means function is in a callback, in my case is 'DOMContentLoaded'.

提交回复
热议问题