当前位置:网站首页>JS judge whether checkbox is selected in the project
JS judge whether checkbox is selected in the project
2022-07-07 09:26:00 【-Coffee-】
<!--js part -->
<script type="text/javascript">
function aa() {var b = false;
var objs = document.getElementsByName("ids");
var a = 0;
var val = "";
for (var i = 0; i < objs.length; i++) {
if (objs[i].checked) {
if (a <= 0) {
b = true;
val = objs[i].value
a = a + 1;
document.getElementById("aaa").href = "Customers/CustomerAction.aspx?id=" + val;
}
if (a > 2) {
alert(' Only one manufacturer can be selected ');
}
}
}
if (a == 0) {
alert(' Please select a manufacturer ');
navTab.reload();
}
}
</script>
<!--Html part -->
<div class="pageContent">
<div class="panelBar">
</div>
<table class="table" width="100%" layoutH="138">
<thead>
<tr>
<th width="22"><input type="checkbox" group="ids" class="checkboxCtrl"></th>
<th width="50" class = "id" > Supplier No </th>
<th align="center" class="style1"> Name of supplier </th>
<th width="100" align="center"> City </th>
<th width="100" align="center"> District and county </th>
<th width="100" align="center"> Customer type </th>
</tr>
</thead>
<tbody>
<asp:Repeater ID="RepeaterTr" runat="server" >
<ItemTemplate>
<tr target="sid_user">
<td><input name="ids" type="checkbox" value="<%#DataBinder.Eval(Container.DataItem, "id")%>" /></td>
<!-- Chinese name 、 English name 、 Picture address -->
<td> <%#DataBinder.Eval(Container.DataItem, "id")%></td>
<td> <%#DataBinder.Eval(Container.DataItem, "customername")%></td>
<td> <%#DataBinder.Eval(Container.DataItem, "provice")%></td>
<td> <%#DataBinder.Eval(Container.DataItem, "city")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>
</tbody>
</table>
</div>
</div>
边栏推荐
- Do you have any certificates with high gold content?
- 超十万字_超详细SSM整合实践_手动实现权限管理
- SAP MM STO单据的外向交货单创建后新加ITEM?
- 正则匹配以XXX开头的,XXX结束的
- Jmeters use
- Confitest of fixture py
- Information Security Experiment 3: the use of PGP email encryption software
- Huawei HCIP - datacom - Core 03 jours
- shake数据库中怎么使用Mongo-shake实现MongoDB的双向同步啊?
- PMP certificate preparation experience sharing
猜你喜欢
What is the use of PMP certificate?
Postman data driven
Postman interface test (I. installation and use)
Jenkins+ant+jmeter use
Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes
Mysql数据库-锁-学习笔记
NATAPP内网穿透
C language pointer (Part 1)
Jenkins modifies the system time
Error: selenium common. exceptions. WebDriverException: Messag‘geckodriver‘ execute
随机推荐
MySql数据库-事务-学习笔记
信息安全实验四:Ip包监视程序实现
Idea development environment installation
Register address name mapping
華為HCIP-DATACOM-Core_03day
What is the use of PMP certificate?
Jenkins modifies the system time
信息安全实验二 :使用X-SCANNER扫描工具
Unity shader (learn more about vertex fragment shaders)
Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes
12、 Sort
Install pyqt5 and Matplotlib module
Locust performance test 2 (interface request)
How to speed up video playback in browser
Huawei HCIP - datacom - Core 03 jours
Difference between interface iterator and iteratable
Test Engineer Interview Questions 2022
C language pointer (Part 1)
4、 Fundamentals of machine learning
SAP MM STO单据的外向交货单创建后新加ITEM?