Javascript Replace innerHTML throwing Unknown Runtime Error

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.

 

你可能感兴趣的:(JavaScript)