ITeye博客

Javascript Replace innerHTML throwing Unknown Runtime Error

standalone · 2011-11-30 12:18 · javascript · Web前端 · Markdown

Quite annoying...IE sucks...

 

http://stackoverflow.com/questions/555965/javascript-replace-innerhtml-throwing-unknown-runtime-error

 

I encountered this problem when I want to change a table's content using el.innerHtml = '<tr>...</tr>' in which el is a table element, IE throws "unknown runtime exception".

Finally I succeeded by adding a div as a wrapper of the table and using divEl.innerHtml  = '<table><tr>...</tr></table>'.

 

See the link you can find some explanations to this. Seems IE is more strict than FF.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。