第一種方法:(使用html5shiv)
<!--[if lt IE9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]-->
由於國內google的伺服器訪問卡,建議呼叫國內的cdn
<!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <![endif]-->
下載html5shiv
https://github.com/aFarkas/html5shiv
本人部落格下載地址:https://i.cnblogs.com/Files.aspx
第二種方法:(需要映入JQuery)
<!--<if lt IE 9> <script> (function(){ if(!/*@cc_on!@*/0){ return; } var arr= "abbr, article, audio, canvas, datalist, dialog, figure, footer, header, nav, hgroup, section, video, progress, aside,svg".split(","); var i = arr.length; while(i--){ document.createElement(arr[i]); } })() </script> <!endif-->