日期:2014-05-16  浏览次数:20286 次

求救ie6的height 100%失效
HTML code
<!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>
</head>
<body>
<input name="" type="button" value="aaa" onclick="aa()" />
<div id="ddd" style="width:200px; height:200px;" style="border:1px solid #000000;">
<div style="width:100%; height:100%; background:#000000;"> </div>
</div>
<script>
function aa(){
document.getElementById("ddd").style.height = "300px"
}
</script>
</body>
</html>



ie7和ff都会自动填充
但ie6就定在那里了
怎么办啊

------解决方案--------------------
出现这个问题的原因是因为IE6渲染的问题,通过某些CSS的属性可以让DOM改变之后再次渲染。