Is using jQuery an option? As this will perform some checks and use fallbacks when Javascript's .innerHTML()
fails.
SCRIPT5007: Unable to get property 'replace' of undefined or null reference
-
19-10-2022 - |
Pregunta
Cant figure out why IE is showing this error message on the line below:
this.innerHTML.replace('#','').trim()
I used getElementsByClassName and looped through all tags and attempting to remove the hashtag from the innerHTML of the link.
Works great in all browsers other than IE.
Any help appreciated.
No hay solución correcta
Otros consejos
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow