我写的代码为什么在ff显示好好的但是在IE就显示不出来呢?
<html>
<body>
<div id= "root " name= "root "> </div>
</body>
<head>
<script language= "javascript ">
var tableE = document.createElement( 'table ');
var tr1E = document.createElement( 'tr ');
var td1E = document.createElement( 'td ');
td1E.setAttribute( "rowspan ", "2 ");
var textfieldE = document.createElement( 'input ');
textfieldE.value = '2007 ';
textfieldE.type = 'text ';
textfieldE.setAttribute( "readonly ", "true ");
textfieldE.size = 4;
textfieldE.style.backgroundColor = '#ffffff ';
td1E.appendChild(textfieldE);
var td2E = document.createElement( 'td ');
td2E.valign = 'bottom ';
var minusbtnE = document.createElement( 'button ');
minusbtnE.style.width = '16px ';
minusbtnE.style.height = '11px ';
minusbtnE.onclick = function(){
textfieldE.value--;
}
var minusbtnimgE = document.createElement( 'img ');
minusbtnimgE.src = 'smallminus.gif ';
minusbtnE.appendChild(minusbtnimgE);
td2E.appendChild(minusbtnE);
tr1E.appendChild(td1E);
tr1E.appendChild(td2E);
var tr2E = document.createElement( 'tr ');
var td3E = document.createElement( 'td ');
td3E.valign = 'top ';
var plusbtnE = document.createElement( 'button ');
plusbtnE.style.width = '16px ';
plusbtnE.style.height = '11px ';
plusbtnE.onclick = function(){
textfieldE.value++;
}
var plusbtnimgE = document.createElement( 'img ');
plusbtnimgE.src = 'smallplus.gif ';
plusbtnE.appendChild(plusbtnimgE);
td3E.appendChild(plusbtnE);
tr2E.appendChild(td3E);
tableE.appendChild(tr1E);
tableE.appendChild(tr2E);
var root = document.getElementById( "root ");
root.appendChild(tableE);
</script>
</head>
</html>
------解决方案--------------------ie对DOM的支持也不是百分百的
------解决方案--------------------ff显示得好的,不调试直接能在IE上显示.....................
告诉你,这是奇迹