document.write("<TD width=\"13%\">"+"aaaaaaa"+"</TD>");
写成:
document.write("<TD width='13%'>"+"aaaaaaa"+"</TD>");
就行了

解决方案 »

  1.   

    在JS里要生成表格的写法:<body>
    <SCRIPT LANGUAGE="JavaScript"><!--
      var a = document.createElement("table");
      a.border = 1;
      a.width  = 200;
      a.cellPadding=2;
      a.cellSpacing=0;  for(var i=0; i<4; i++)
      {
        a.insertRow();
        for(var j=0; j<6; j++)
        {
          var b = a.rows[i].insertCell();
          b.innerText = i +""+ j;
          b.width = "16%";
        }
      }  document.body.insertAdjacentElement("beforeEnd", a);
    //--></SCRIPT>
      

  2.   

    Creates an instance of the element object for the specified tag. Only new IMG and OPTION elements can be created. Before they can be used, new objects must be explicitly added to their respective collections. 根据msdn的document.createElement介绍,只能新建img和option 对象啊。
      

  3.   

    To: starrow() 在IE4.0里确实只能 createElement    img area option
    而到了IE5.0你就可以新建出任意的HTML对象了!!!!