处置IE6下默认不缓存背景图片
处理IE6下默认不缓存背景图片
方法一:写在JS文件中
方法二:写在html中
方法三:写在css中
写在CSS中效率会比较低
方法一:写在JS文件中
if ($.browser.msie && parseInt($.browser.version, 10) < 7) { try { document.execCommand("BackgroundImageCache", false, true) } catch (e) { } }
方法二:写在html中
<!--[if IE 6]> <script type="text/javascript"> //<![CDATA[ try { document.execCommand("BackgroundImageCache", false, true); } catch(e) {} //]]> </script> <![endif]-->
方法三:写在css中
html { filter:expression(document.execCommand("BackgroundImageCache",false,true)); }
写在CSS中效率会比较低