Home >Web Front-end >JS Tutorial >Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:09:331053browse

Test code:


[Ctrl A select all Note: If you need to introduce external Js, you need to refresh to execute
]


The output of each browser is as follows
IE6/7/8:

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

IE9/Firefox/Chrome/Safari/Opera :

Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills

You can see that the semicolon is missing in IE6/7/8. Be careful when using the cssText property. <script> var div = document.getElementsByTagName('div'); alert(div[0].style.cssText); </script>
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