In today’s work, there is a check box for the onchage event binding function that clearly has been implemented. Typeerror: XXX is not a function Typeerror: XXX is not a function Uncaught ReferenceError: AA is not defined, but the error message is different. Carefully contrasting the two errors, “is not defined” means the type is not defined. Is not a function means that the type is not of function type. After searching Baidu, it is found that some browsers can directly find the changed element through the element ID in the JS code, and then rewrite the defined function by the element in the DOM, which will lead to the error is not a function.
solution:
modify the element ID value, or modify the name of the function.
Of course, not all errors of this type are caused by this reason, and it should be analyzed on a case-by-case basis.
Read More:
- TypeError: connection.connect is not a function
- Common error: uncaught typeerror: document.getElementsByClassName (…).addEventListener is not a function
- [Solved] Error handling response: TypeError: self.processResponse is not a function
- TypeError: this.getOptions is not a function at Object.lessLoader
- Using webpack to report typeerror: this.getresolve is not a function
- [react+antd] Table Error: Unhandled Rejection (TypeError): data.slice is not a function
- TypeError: this.getOptions is not a function
- Typeerror occurred during gitbook installation: cb.apply is not a function
- [Solved] jQuery Error: Uncaught TypeError: this.attr is not a function
- Syntax error: typeerror: this.getoptions is not a function an error is reported when the. SCSS file is imported globally
- Front end project runtime prompts syntax error: typeerror: token.type.endswith is not a function solution
- Typeerror in gitbook init: cb.apply is not a function solution
- Webpack error module build failed: typeerror: fileSystem.statSync is not a function
- Python error prompt: typeerror: ‘builtin’_ function_ or_ method‘ object is not subscriptable
- Uncaught (in promise) TypeError: Object(…) is not a function
- Vue error in mounted hook: “typeerror: object (…) is not a function“
- Vue Error in v-on handler: “TypeError: path.indexOf is not a function“
- Vue — report error with less module build failed: typeerror: loaderContext.getResolve is not a function
- About iView reporting error in Vue project: error in mounted hook: “typeerror: this$ parent.updateNav is not a function”
- Python TypeError: ‘newline’ is an invalid keyword argument for this function