zoukankan
html css js c++ java
js 取得CheckBoxList的选中项的值
父页面:(TextBox1用来接收子页面(user_code.aspx)传回来的值)
<
script
language
="javascript"
type
="text/javascript"
>
function
show_win()
{
var
var_win
=
0
;
showModalDialog('user_code.aspx',[window,document.getElementById(
"
TextBox1
"
).id],'status:Modeless;edge:raised;unadorned:no;scroll
=
no;resizable:yes;center:yes;help:no;dialog520px;dialogheight:420px');
}
</
script
>
子页面(user_code.aspx):
<
script
language
="javascript"
type
="text/javascript"
>
function
selected_info(str)
{
var
CheckBoxList
=
document.all.CheckBoxList1;
var
textbox
=
document.all.hid_user_code;
textbox.value
=
""
;
var
objCheckBox ;
for
(i
=
0
;i
<
CheckBoxList.rows.length;i
++
)
{
objCheckBox
=
document.getElementById(
"
CheckBoxList1_
"
+
i);
if
(objCheckBox.checked
==
true
)
{
textbox.value
+=
CheckBoxList.rows[i].cells[
0
].childNodes(
1
).innerText
+
"
,
"
;
}
}
window.dialogArguments[
0
].document.getElementById(window.dialogArguments[
1
]).value
=
textbox.value;
window.close();
}
</
script
>
<
form
>
<
div
>
<
table
style
=" 403px; height: 282px"
>
<
tr
>
<
td
style
=" 100px"
>
<
asp:Label
ID
="Label1"
runat
="server"
Text
="用户编号:"
Width
="72px"
></
asp:Label
>
</
td
>
</
tr
>
<
tr
>
<
td
style
=" 100px"
>
<
asp:CheckBoxList
ID
="CheckBoxList1"
runat
="server"
>
</
asp:CheckBoxList
>
</
td
>
</
tr
>
</
table
>
<
hr
/>
<
asp:Button
ID
="btn_confirm"
runat
="server"
Text
="确定"
/>
</
div
>
<
input
id
="hid_user_code"
runat
="server"
type
="text"
/>
</
form
>
查看全文
相关阅读:
elk 分布式数据同步
mget 同时获取
Jzoj1460 无题noname
Jzoj1460 无题noname
Jzoj1322硬币
Jzoj1322硬币
Jzoj1321 灯
Jzoj1321 灯
Jzoj1310 生日礼物
Jzoj1310 生日礼物
原文地址:https://www.cnblogs.com/simhare/p/926160.html
最新文章
POJ 2406 Power Strings
POJ 2752 Seek the Name, Seek the Fame
POJ 3461 Oulipo
玩转Web之Json(一)-----easy ui+ajax + json 中关于Json的解析问题
Nginx多虚拟主机下泛域名配置
myEclipse项目部署按钮失效了,怎么办?
玩转Web之JavaScript(四)-----javaScript语法总结(四) JS中的函数
玩转Web之JavaScript(二)-----javaScript语法总结(二) 涉及Date与数组的语法
玩转Web之JavaScript(一)-----javaScript语法总结(一) 与鼠标操作有关的语法
app后端设计(11)-- 系统架构(2014.12.05更新)
热门文章
app后端设计(10)--数据增量更新
app后端设计(9)-- 动态通知
elaserch 查看节点是否是master
zookeeper leader作用
zookeeper leader作用
闭包的潜在用处
闭包的潜在用处
zookeeper 同步
zookeeper 同步
elk 分布式数据同步
Copyright © 2011-2022 走看看