我的html网页在IE6下运行时,背景图片会闪烁,在网上搜了一下,发现document.execCommand("BackgroundImageCache", false, true)可以避免该问题,于是在<head>里加了如下代码:
<!--[if IE 6]>
<script type="text/javascript">
document.execCommand("BackgroundImageCache", false, true);
</script>
<![endif]-->运行后,提示“参数无效”,不知道是什么原因,请各位高手指点!
<!--[if IE 6]>
<script type="text/javascript">
document.execCommand("BackgroundImageCache", false, true);
</script>
<![endif]-->运行后,提示“参数无效”,不知道是什么原因,请各位高手指点!
调试的时候提示“document.execCommand("BackgroundImageCache", false, true); ”这一行参数无效,其他地方没有发现错误 ,哭啊。。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<!--[if IE 6]>
<script type="text/javascript">
document.execCommand("BackgroundImageCache",false,true);
alert(9);
</script>
<![endif]-->
</head>
<body></body>
</html>
在IE6下运行,还是提示参数无效,不知道是什么原因?