In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "how to make browsers below IE9 compatible with HTML5". In daily operation, I believe many people have doubts about how to make browsers below IE9 compatible with HTML5. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "how to make browsers below IE9 compatible with HTML5". Next, please follow the editor to study!
For IE (including IE6) to support the HTML5 element, we need to add the following JavaScript to the HTML header, which is a simple document.createElement declaration that invokes the js file against IE with conditional comments. Other non-IE browsers such as Opera,FireFox will ignore this code and there will be no http requests.
Copy the code
The code is as follows:
The above code will only run under the IE browser, and it should be noted that calling the html5.js file in the page must be added to the head element of the page, because the IE browser must know the element before parsing, so the js file cannot be called at the bottom of the page.
The js file of html5 is provided by the author on Google code project and can be called directly. Of course, if you feel that this will affect the opening speed of your web page, you can download the js file of html5 directly and upload it to your own server.
The following is the code in the js file of html5:
Copy the code
The code is as follows:
(function () {if (! / * @ ccroomonically accurate roommates beat 0) return;var e = "abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video" .split (','), idetecte.roomthsit while (I -) {document.createElement (e [I])}) ()
In addition to calling the js file containing the above code in the web page to make the IE browser support the HTML5 element, you can also add the code directly to the web page in the following way.
Copy the code
The code is as follows:
(function () {if (! / * @ ccroomonically accurate roommates beat 0) return;var e = "abbr,article,aside,audio,canvas,datalist,details,dialog,eventsource,figure,footer,header,hgroup,mark,menu,meter,nav,output,progress,section,time,video" .split (','), idetecte.roomthsit while (I -) {document.createElement (e [I])}) ()
At this point, the study on "how to make browsers below IE9 compatible with HTML5" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.