document.all.table1.style.setAttribute("display","none");

解决方案 »

  1.   

    就不能一次性把表格里的,STYTLE负值吗?
    document.all.table1.style.setAttribute("display","none");
    document.all.table1.style.display="none"
    都很麻烦啊
      

  2.   

    <HTML>
    <HEAD>
    <TITLE></TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    function kk(){
    document.all.table1.style.setAttribute("display","none"); 
    }
    </SCRIPT>
    </HEAD>
    <BODY><table id="table1" style="" cellSpacing="1" cellPadding="1" border=1>
    <tr>
    <td>dddddddddddddddddddddddddddd</td>
    </tr>
    </table><br>
    <input type=button onclick="kk();" value="click me" />
    </BODY>
    </HTML>
      

  3.   

    <style>
    .css1 {display:none;color:red}
    </style>document.all.table1.className = "css1";
      

  4.   

    to kingdomzhf(旭日东升) ( ) 就不能一次性把表格里的,STYTLE负值吗?
    document.all.table1.style.setAttribute("display","none");
    document.all.table1.style.display="none"
    都很麻烦啊
    像这样的document.all.table1.setAttribute("style","display:none;width:32px"); 但是不行哟
      

  5.   

    TO bencalie(Bencalie) (
    <style>
    .css1 {display:none;color:red}
    </style>这个可以动态用脚本添加这些display:none;color:red吗?
      

  6.   

    请问:在.net的客户端动态的增加控件后,怎么动态的改变这些控件的Style???
      

  7.   

    to  chenpeter(Ice) ( ) 
    dim mytablerow as new htmltablerow()
    mytablerow.attribles.add("sytle","width:222px")
    是这个意思吗
      

  8.   

    <style>
    .css1 {display:none;color:red}
    </style>
    <table id="table1" style="" cellSpacing="1" cellPadding="1" border=1>
    <tr>
    <td>dddddddddddddddddddddddddddd</td>
    </tr>
    </table>
    <button onclick="document.all.table1.className = 'css1';">Change</button>
      

  9.   

    to bencalie.css1 {display:none;color:red}我是想问可不可以动态添加display:none;color:red这些值呢
      

  10.   

    Microsoft Example<DIV>
    Internet Explorer makes <B>HTML</B> dynamic.
    </DIV><SCRIPT>
       var new_rule;
       new_rule = styleSheets[0].addRule("DIV B", "color:blue", 0);
    </SCRIPT>============<H2>
    <A HREF="http://www.microsoft.com/">
        Where Do You Want to Go Today?
    </A>
    </H2><SCRIPT>
       document.styleSheets[0].addRule("H2 A:hover", "color:gold");
       document.styleSheets[0].addRule("H2 A:link", "color:black");
    </SCRIPT>