The code for the original error is as follows:
Copy Code code as follows:
<p style= "margin-top:0;" >
<asp:textbox id= "txtcontent" runat= "Server" textmode= "MultiLine" height= "450" width= "98%" ></asp:textbox >
</p>
The reason for the error should be that p in IE7, IE8 does not support innerHTML. Codemirror's authors also found the problem, RELATED links:
https://github.com/marijnh/CodeMirror2/issues/215
Https://github.com/marijnh/CodeMirror2/commit/4886415d6054571f92fa4d5601ebe7d601e952ab
Copy Code code as follows:
try {stringwidth ("X");}
catch (e) {
if (E.message.match (/runtime/i) | | | e.message.match (/runtime/I))
E = new Error ("A codemirror inside a p-style element does not work in Internet Explorer. (InnerHTML bug) ");
Throw e;
}
TextArea the outer layer of P into Div, you can be normal:
Copy Code code as follows:
<div style= "margin-top:0;" >
<asp:textbox id= "txtcontent" runat= "Server" textmode= "MultiLine" height= "450" width= "98%" ></asp:textbox >
</div>