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
>
查看全文
相关阅读:
Android CTS(frome google)
Android CTS
【Linux】- 修改系统时间与时区
【Linux】- CentOS查看IP
【Linux】- Ubutnu UFW防火墙的简单设置
【Linux】- Ubuntu安装nginx
【Linux】- apt-get命令
【Linux】- Ubuntu搭建FTP服务器
【Linux】- Ubuntu 配置mysql远程访问
【Linux】- Ubuntu安装redis,并开启远程访问
原文地址:https://www.cnblogs.com/simhare/p/926160.html
最新文章
巧妙的重载魔术方法__call()
遍历生成目录树
KVM (虚拟机创建及管理,存储管理)
KVM虚拟化(KVM简介和KVM安装)
jenkins 简介和简单操作
Git 简介及简单操作
python3 自动部署MariaDB主从复制
zabbix
非关系型数据库---Redis
MariaDB数据库---主从复制,galera架构
热门文章
数据库备份和恢复---MariaDB
MySQL数据库的逻辑架构和存储引擎
Tiny4412 Android 启动流程
Tiny4412 Linux 内核启动流程
Tiny4412 Linux 内核配置流程
【转载】你知道 Linux 内核是如何构建的吗?
Tiny4412 u-boot分析(3)u-boot 引导内核流程
Tiny4412 u-boot分析(2)u-boot启动流程
Tiny4412 u-boot分析(1)u-boot配置流程分析
Android Tombstone 分析
Copyright © 2011-2022 走看看