


Some problems and solutions in IE DOM implementation_javascript skills
May 16, 2016 pm 06:49 PMTo summarize, it is mainly in the following two aspects:
1. In IE, the script cannot use setAttribute() to set its style information (css). It must use element.style.property=value (Note: here value is value to be set) to achieve the rendering effect of an element.
eg.document.getElementById("id").style.fontweight="normal";
2.IE does not support setAttribute() to set its response event, although this is supported in the W3c standard. The solution is to use notation to reference the handler that responds to the event, and then call the anonymous function of the relevant handler function to set the event program.
eg.document.getElementById("id").onclick=function (){ deal_with_onclick() };
Note: deal_with_onclick() is the processing function of the onclick event.

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

What should I do if win11 cannot use ie11 browser? (win11 cannot use IE browser)

Internet Explorer opens Edge: How to stop MS Edge redirection

What are the ways to obtain DOM nodes in Vue3

How to cancel the automatic jump to Edge when opening IE in Win10_Solution to the automatic jump of IE browser page

The end of an era: Internet Explorer 11 is retired, here's what you need to know

How to solve the problem that IE shortcut cannot be deleted
