标签:style tar ext color get width
//全局仅能选择一个复选框
function CheckLimit(check) {
var inputs = document.getElementsByTagName("input");
for (var i = 0; i < inputs.length; i++) {
if (inputs[i].type == "checkbox") {
inputs[i].checked = false;
}
}
check.checked = true;
}
控件
<asp:GridView ID="gvwInfo" runat="server" Width="654px"
EmptyDataText="无信息!">
<EmptyDataRowStyle ForeColor="Red" HorizontalAlign="Center" />
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="SelectData" runat="server" onclick="ColumnCheckLimit(this)"/>//调用JS方法
</ItemTemplate>
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle Width="8%" HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField HeaderText="名称" DataField="NAME">
<ItemStyle Width="40%" HorizontalAlign="Center" />
<HeaderStyle Width="40%" HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
</asp:GridView>
GridView全局仅能选择一个复选框,布布扣,bubuko.com
标签:style tar ext color get width
原文地址:http://www.cnblogs.com/hjxh/p/3804325.html