疯子的博客

做一件事,专注一件事
IE中给select的innerHTML赋值时的bug
<html xmlns="http://www.w3.org/1999/xhtml" >
<head >
 
<title>无标题页</title>
<script>

function test()
{

str
=<option>aaaa</option>”;
 var a=document.getElementById ("select1");
 a.innerHTML
=str;
alert(a.innerHTML);
//显示“aaaa</option>”

}
 
</script>
</head>
<body onload="test()">
<form id="form1" >
     
<select id="select1"><option>aaaaa</option></select>
    
<input type ="submit" />
 
</form>
</body>
</html>


官方说明http://support.microsoft.com/kb/276228

posted on 2009-11-22 22:52  老陈  阅读(831)  评论(0)    收藏  举报