Home > Web Front-end > JS Tutorial > body text

Problems caused by IE innerHTML, outerHTML_javascript skills

WBOY
Release: 2016-05-16 18:51:41
Original
1278 people have browsed it

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.
Related labels:
ie
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!