如题。

解决方案 »

  1.   

    这样?
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=gb2312">
    <title> new document </title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <script type="text/javascript" src="js/jq.js"></script>
    </head>
    <script type="text/javascript">
    <!--
    $(document).ready(function(){$("#kk").children().each(function(){alert($(this).html())})});
    $(document).ready(function(){$("#kk input").each(function(){alert(this.outerHTML)})});
    //-->
    </script>
    <body>
    <table>
    <tr id="kk">
    <td>a</td>
    <td><input type="text" name="dfds"></td>
    <td><input type="checkbox" name="sd34" value=""/></td>
    <td><div id="dfsd">dfsa</div></td>
    </tr>
    </table>
    </body>
    </html>
      

  2.   

    例如有如下的一个tr,我要将其中所用的控件还原成页面初始化时的值,应该如何遍历                            <tr id="trTest">
                                    <td class="dinput"><asp:DropDownList id="droYZ" runat="server"></asp:DropDownList></td>
                                    <td class="dinput"><asp:TextBox id="txtJB" runat="server" CssClass="textbox" Width="100%"></asp:TextBox></td>
                                    <td class="dinput"><asp:DropDownList id="droYD" runat="server"></asp:DropDownList></td>
                                    <td class="dinput"><asp:DropDownList id="droTS" runat="server"></asp:DropDownList></td>
                                    <td class="dinput"><asp:DropDownList id="droXZ" runat="server"></asp:DropDownList></td>
                                </tr>
      

  3.   

    $("#trTest td select");asp控件在程序加载前会将服务器控件编译成html控件
    DropDownList  就会成为普通的select  
    TextBox 是input type=text
    但是id不会改
    接下来你就应该明白了
    $("#trTest td select").each(function () {
       //do something             
     });
      

  4.   

    $("#trTest td select,trTest td :text").each(function () {
      //do something  
    });
    遍历DropDownList  TextBox 。
      

  5.   

    $("#trTest td select,#trTest td :text").each(function () {
      //do something  
    });
    少了个"#" ,- - .