(index):43UncaughtTypeError:Cannotreadproperty'init'ofundefinedatObject.success

发布时间:2019-08-11 05:45:19

(index):43 Uncaught TypeError: Cannot read property 'init' of undefined at Object.success

推荐回答

获取 button 元素时,使用的是 getElementByIDd, 而HTML中buttont 添加的是的是 class 属性,所以脚本中的 btn 变量是 null;

以上是js事件处理程序 Uncaught TypeError: Cannot read property 'addEventListener' of nullScript的内容,更多addEventListener TypeError property Uncaught 事件 处理 程序 Cannot null read 的内容,请您使用右上方搜索功能获取相关信息!
以上问题属网友观点,不代表本站立场,仅供参考!