当前位置:网站首页>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>
边栏推荐
猜你喜欢

Data association between two interfaces of postman

Why is access to the external network prohibited for internal services of the company?

Jenkins+ant+jmeter use

Confitest of fixture py

JWT certification used in DRF

Mysql数据库-锁-学习笔记

Information Security Experiment 4: implementation of IP packet monitoring program

战略合作|SubQuery 成为章鱼网络浏览器的秘密武器

华为HCIP-DATACOM-Core_03day
![[SVN] what is SVN? How do you use it?](/img/45/a7df8989f18f0a6185582389398d1a.png)
[SVN] what is SVN? How do you use it?
随机推荐
Confitest of fixture py
Yapi test plug-in -- cross request
Locust performance test 4 (custom load Policy)
浏览器中如何让视频倍速播放
Connecting mobile phone with ADB
Unity uses mesh to realize real-time point cloud (I)
Skill review of test engineer before interview
Nested (multi-level) childrn routes, query parameters, named routes, replace attribute, props configuration of routes, params parameters of routes
Detailed learning notes of JVM memory structure (I)
Regularly modify the system time of the computer
Add new item after the outbound delivery order of SAP mm sto document is created?
Implementation of corner badge of Youmeng message push
PMP Exam Preparation experience, seek common ground while reserving differences, and successfully pass the exam
Postman data driven
What is the value of getting a PMP certificate?
Jenkins+ant+jmeter use
答案在哪里?action config/Interceptor/class/servlet
Difference between interface iterator and iteratable
Entity of cesium data visualization (Part 1)
Unity uses mesh to realize real-time point cloud (II)