html5不支持ie8怎么解决?

692 ℃

html5不支持ie8怎么解决?下面web建站小编给大家详细介绍一下解决方法!

方法一:引用google的html5.js文件

<!–[if lt IE9]> 
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]–>

方法二:定义js

<script> 
 (function() {
   if (! 
   /*@cc_on!@*/
   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(', ');
   var i= e.length;
   while (i--){
       document.createElement(e[i])
  } 
})() 
</script>

阻止事件冒泡e.stopPropagation()不兼容ie6/7/8解决方法

阻止默认行为ev.preventDefault()不兼容ie6/7/8解决方法

classList.add和classList.remove不兼容ie6/7/8/9解决方法

自定义属性data-* 不兼容ie6/7/8/9/10解决方法

getElementsByclassName不兼容IE6/7/8解决方法!

标签: html5, 兼容IE8

上面是“html5不支持ie8怎么解决?”的全面内容,想了解更多关于 js 内容,请继续关注web建站教程。

当前网址:https://m.ipkd.cn/webs_3012.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

生活小工具

收录了万年历、老黄历、八字智能排盘等100+款小工具!生活小工具
css3利用sticky实现滚动标题变化效果
Tailwind CSS中文文档官网介绍
帝国cms用手机访问PC端网站如何自动跳转到手机端
面试题:JavaScript中10道面试题及答案
Mpvue Calendar日历组件文档官网介绍