Home  >  Article  >  Web Front-end  >  Problems caused by IE innerHTML, outerHTML_javascript skills

Problems caused by IE innerHTML, outerHTML_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:51:411280browse

innerHTML or outerHTML
For example:

Copy code The code is as follows:

var crtDIV = document.getElementById('divIDName');
if (crtDIV) {
crtDIV.parentNode.removeChild(crtDIV);
crtDIV.outerHTML = "";
}

It is possible to find that the entire interface cannot be selected, and only links can be clicked.
To solve this exception or IE error, only:
Do not use outerHTML, or innerHTML.
If it is When innerHTML
is used, just give the innerHTML object .focus(); obj.focus() and you can operate the page normally.
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn