The program code idea is roughly as follows. I want to dynamically change the innerHTML content of the tr tag, but IE reports an unknown runtime error.
The Code is as follows:
Script
Document. getElementById ("trone"). innerHTML = "haha ";
Script
In IE, "unknown runtime error" may sometimes occur, but not in firefox.
This is mainly because when IE writes innerHTML, it will check whether the element meets the requirements of the html object container in the content. For example, if you add
. So if you find these errors occur, try to do two things:
1. Check whether the html code you tried to add to innerHTML contains broken html tags. If not
Surrounded
.
2. Change your container to the "inclusive" labels, for example,
Note that,
,
Add the correct format to the tag
Labels may have errors, so avoid using these labels as containers and use them if necessary. |
As a container, a layer of tables is nested.
Therefore
|
| Use document. getElementById ("trone"). innerHTML = "new. Solution: You can use javascript to dynamically create
Instead of using innerHTML. |