The example in this article describes the solution to the "unknown runtime error" prompt under IE8 when the js plug-in sets innerHTML. Share it with everyone for your reference. The specific analysis is as follows:
Problem description:
A js plug-in is used in the website. When setting innerHTML, an "Unknown runtime error" error is reported under IE8:
<div id="divContainer"> <a name="link"> -->报错处 第三方插件内容… </a> </div>
Reason:
The innerHTML object set is an , because the object of is relatively low-inclusive. When the browser runs this script, a runtime error is detected.
Solution:
Replace the tag with the I hope this article will be helpful to everyone’s JavaScript programming design.