当前位置:网站首页>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>
边栏推荐
- Postman interface debugging method
- C language pointer (Part 2)
- Sublime Text4 download the view in bower and set the shortcut key
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [five nails / flying Book notice]
- 战略合作|SubQuery 成为章鱼网络浏览器的秘密武器
- How can I apply for a PMP certificate?
- VSCode+mingw64+cmake
- sqlplus乱码问题,求解答
- Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]
- PMP certificate preparation experience sharing
猜你喜欢

Systick tick timer

Selenium mouse sliding operation event
![Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]](/img/33/9fde4bce4866b988dd2393a665a48c.jpg)
Pytest+request+allure+excel interface automatic construction from 0 to 1 [familiar with framework structure]

PMP examination experience sharing
![[cloud native] Devops (I): introduction to Devops and use of code tool](/img/e0/6152b3248ce19d0dbba3ac4845eb65.png)
[cloud native] Devops (I): introduction to Devops and use of code tool

软件建模与分析

答案在哪里?action config/Interceptor/class/servlet

VSCode+mingw64+cmake

Sublime Text4 download the view in bower and set the shortcut key

How long does the PMP usually need to prepare for the exam in advance?
随机推荐
Register address name mapping
信息安全实验二 :使用X-SCANNER扫描工具
Over 100000 words_ Ultra detailed SSM integration practice_ Manually implement permission management
C language pointer (Part 1)
Implementation of corner badge of Youmeng message push
JWT certification used in DRF
Unity shader (to achieve a simple material effect with adjustable color attributes only)
嵌套(多级)childrn路由,query参数,命名路由,replace属性,路由的props配置,路由的params参数
MySql数据库-索引-学习笔记
Postman interface test (II. Set global variables \ sets)
Integer or int? How to select data types for entity classes in ORM
Where is the answer? action config/Interceptor/class/servlet
二叉树高频题型
Using JWT to realize login function
What are the suggestions for PMP candidates?
PMP Exam details after the release of the new exam outline
华为HCIP-DATACOM-Core_03day
Network request process
esp8266使用TF卡并读写数据(基于arduino)
ComputeShader