For this problem, I don’t know whether I should blame IE6 for not automatically updating, or I should curse the W3C standard for not being backward compatible.
This is the traditional embedding method of FLASH:
< object classid = " clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 " codebase = " http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0 " width = " 32 " height = " 32 " >
< param name = " movie " value = " test.swf " />
< param name = " quality " value = " high " />
< embed src = " test.swf " quality = " high " pluginspage = " http://www.macromedia.com/go/getflashplayer " type = " application/x-shockwave-flash " width = " 32 " height = " 32 " ></ embed >
</object>
Use object and embed tags to embed. If you are careful, you will find that many parameters of object and many attributes of embed are repeated.
Some browsers support object and some support embed, which is why both places must be changed when modifying Flash parameters. This method has always been Macromedia's official method, ensuring the functionality of Flash to the greatest extent without compatibility issues.
But since the W3C standard has emerged, and some customers have pushed hard to pass the standard, things have become complicated:
embed is considered illegal
The embed tag is a private tag of Netscape. Although the embed tag is widely used, from HTML3.2, HTML4.0 to XHTML1.0, W3C has not included this tag. Pages using the embed tag will not pass W3C validation.
In fact, they are right to think this way. For most users in Western countries, the genuine Vista system has basically been popularized. Most of them use mainstream browsers such as IE7.0/IE8.0. Using such brief tags can save several lines of code. :
However, in China, where piracy is rampant, most users are still using the IE6 browser that comes with Windows XP systems, and it does not support the object tag, so workarounds can only be used to solve it.
Current interim measures
What should I do to not only comply with standards but also display flash correctly in all browsers? We can add a lengthy JavaScript to hide the embed tag:
Not only that, you also need to add several parameters for calling the JS in the page
Then a new problem arises, what if the user disables javascript?
Do we need to write more code first to determine what browser the user is using, and then output the appropriate code based on the browser? Damn it, how much does it affect the efficiency of page execution? For the sake of a W3C standard, so many lines of code are added to make every user who visits your website wait an extra second?
So the point I want to make is:
At present, in the environment where IE6 is popular, do not consider the W3C standard for the time being. Make your own pages carefully and write as few lines of code as possible. Don't make standards for the sake of standards.