
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to deal with Internet Explorer and addEventListener problem "Object doesn't support this property or method" in JavaScript?
To deal with “Object doesn’t support this property or method” issue in JavaScript, while using events and Internet Explorer, update your code with this −
Example
<html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge;" /> </head> <body> ... </body> </html>
You can also use attachEvent in IE to solve this issue like this −
if (ev.addEventListener) { ev.addEventListener('click', myText, false); } else if (ev.attachEvent) { ev.attachEvent('onclick', myText); }
- Related Questions & Answers
- Why doesn't JavaScript support multithreading?
- Getting Error message “Object doesn't support property or method 'attachEvent'” in IE11 to call SAP system
- Explain JavaScript "this" keyword?
- Why doesn't MySQL support millisecond / microsecond precision?
- Why doesn't C++ support functions returning arrays
- "delete this" in C++?
- What's the difference between "!!" and "?" in Kotlin?
- How to create "next" and "previous" buttons with CSS?
- Difference between a "class" and an "object" in Kotlin
- How can we follow "Don't think about work at home"?
- Linux – How to resolve the error "can't connect to Docker daemon"
- Can we use "this" keyword in a static method in java?
- What's the difference between "update" and "update_idletasks" in Tkinter?
- Why can't we use the "super" keyword is in a static method in java?
- Java regex program to match parenthesis "(" or, ")".
Advertisements