猿问

用JavaScript获取GridView的ItemTemplate的CheckBox全选或全部取消?

 <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Width="770px"
                        OnDataBound="GridView1_DataBound">
                        <Columns>
                            <asp:TemplateField HeaderText="选择">
                                <EditItemTemplate>
                                    <asp:CheckBox ID="CheckBox1" runat="server" />
                                </EditItemTemplate>
                                <HeaderTemplate>
                                    <input type="checkbox" id="checkbox_1" onclick="Check()" />全选
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="CB_Item" runat="server" />
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Center" />
                            </asp:TemplateField>

蓝山帝景
浏览 460回答 1
1回答
随时随地看视频慕课网APP
我要回答