zoukankan
html css js c++ java
用js 判断datagrid 中的 checkbox 是否被选中
private
void
Page_Load(
object
sender, System.EventArgs e)
{
//
在此处放置用户代码以初始化页面
this
.sqlDataAdapter1.Fill (
this
.dataSet11 );
this
.DataGrid1.DataSource
=
this
.dataSet11.Tables[
0
];
this
.DataGrid1 .DataBind ();
this
.Button1.Attributes.Add (
"
onclick
"
,
"
return get_value('
"
+
this
.DataGrid1.ID .ToString ()
+
"
')
"
);
}
function
get_value(dataid)
{
var
s
=
document.getElementsByTagName(
"
input
"
)
var
flag
=
false
;
for
(i
=
0
;i
<
s.length;i
++
)
{
if
(s[i].type
==
"
checkbox
"
&&
s[i].checked
&&
s[i].id.substring (
0
,dataid.length)
==
dataid)
//
判断是否为checkbox 类型,判断是否被选中,判断是不是 datagrid 的 checkbox .
//
此处注意命名时不能以 datagrid 命名开头的 例如 datagrid id 为 abc, 就不能再命名以 abc 命名开头的了 比如命名为 abcd,abce,abcdefb,
{
flag
=
true
;
}
}
if
(flag)
return
window.confirm(
"
删除吗
"
);
else
{
window.alert (
"
你没有选择数据
"
)
return
false
;
}
}
查看全文
相关阅读:
water——小根堆+BFS
P5930 [POI1999]降水/SP212 WATER
Blue Mary的战役地图——Hash表
Antisymmetry(反对称)——Manacher
数论基础
可持久化数据结构(线段树,trie树)
20200725模拟赛5题解
vscode 如何创建git 新分支
mysql 把一个数据库中的表数据复制到另一个数据库中
shrio中的用法以及配置
原文地址:https://www.cnblogs.com/gwazy/p/170701.html
最新文章
Redis详解(七)- AOF 持久化
Redis详解(六)- RDB 持久化
Redis详解(五)- redis的五大数据类型实现原理
Redis详解(四)- redis的底层数据结构
《CCF语音对话与听觉前沿研讨会》
《平安人寿智能平台团队:智能问答系统的探索与实践》
《平安人寿智能平台团队:人机交互场景下的知识挖掘》
《如何让任务型聊天机器人更加鲁棒》
《ACL 2020丨多领域端到端任务型对话系统》
《33-Rokid ALab NLP负责人陈见耸:任务式对话系统实践》
热门文章
《小蜜智能对话开发平台的技术探索与场景实践》
《Rasa Developer Summit 2019 Rasa2019开发者大会》TBC
《PaperWeekly 清华大学:计算未来轻沙龙——对话系统研究进展》—— 周昊
html改滚动条样式
python pandas模块to_dict()实用
python中四舍五入精度问题
制作一个Web应用,如何考虑他的安全性、高性能?
我的博客园美化
Wedding —— 2-SAT
C++运算符优先级
Copyright © 2011-2022 走看看