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.

没有正确的解决方案

其他提示

Is using jQuery an option? As this will perform some checks and use fallbacks when Javascript's .innerHTML() fails.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top