Home >Web Front-end >JS Tutorial >Get the code for the text of the option selected in the following box under firefox_javascript skills
Knowledge points:
0. Why innerText? Because of security issues
1. Extend attributes for the firefox dom model
2. The currentStyle attribute can obtain the actual style status
3. When IE implements innerText, it considers the display method. If it is a block, a newline is added
4. Why not use textContent? Because textContent does not take into account the display mode of the element, it is not fully compatible with IE.
Code: The test passed under IE6, 7, 8 and Firefox 2, 3.