rt!!网上找了会没找到?! 郁闷.

解决方案 »

  1.   

    setAttribute("align","center");
    是这个意思不?
      

  2.   

    是动态生成tag啊, 不是动态的话直接往里面写就可以了.
      

  3.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Using HTC for form</title>
    <script language="javascript">
    function a()
    {
    var xx=document.getElementById("c");
    alert(xx.jselect);
    }
    function init()
    {
    var td=document.createElement("td");
    td.id="c";
    td.setAttribute("jselect","mink");
    td.innerText="asdadasdasdadas";
    var tr=document.getElementById("b");
    tr.appendChild(td);
    }
    </script>
    </head>
    <body onload="init()">
    <table border="1">
    <tr id="b">

    </tr>
    </table>
    <button onclick="a()">asdasdasd</button>
    </body>
    </html>
    ==============================
    搞定了!!!!!