Home >Web Front-end >JS Tutorial >Test code with missing semicolon in cssText return value only under IE6/7/8_javascript skills
Test code:
The output of each browser is as follows
IE6/7/8:
IE9/Firefox/Chrome/Safari/Opera :
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>