zoukankan
html css js c++ java
asp.net服务器控件调用js
<
asp:DropDownList id
=
"
DropDownList1
"
runat
=
"
server
"
>
<
asp:ListItem Value
=
"
1
"
>
11111
</
asp:ListItem
>
<
asp:ListItem Value
=
"
2
"
>
222222
</
asp:ListItem
>
</
asp:DropDownList
>
<
div id
=
"
div1
"
>
11111
</
div
>
<
div id
=
"
div2
"
>
22222
</
div
>
function change()
{
//
下面这句使用Form1.DropDownList1.value无法得到value,要用getElementById
if
(document.getElementById (
'
DropDownList1
'
).value
==
"
1
"
)
{
div2.style.display
=
"
none
"
;
div1.style.display
=
"
block
"
;
}
else
{
div2.style.display
=
"
block
"
;
div1.style.display
=
"
none
"
;
}
}
//
下面是重点,为DropDownList1控件的onChange事件绑定js的change()函数
private
void
Page_Load(
object
sender, System.EventArgs e)
{
DropDownList1.Attributes.Add(
"
onChange
"
,
"
change();
"
);
}
查看全文
相关阅读:
hdu3667 Transportation 费用与流量平方成正比的最小流 拆边法+最小费用最大流
最小费用最大流模板
poj3020 Antenna Placement 匈牙利算法求最小覆盖=最大匹配数(自身对应自身情况下要对半) 小圈圈圈点
Risk UVA
poj2391 Ombrophobic Bovines 拆点+二分法+最大流
Taxi Cab Scheme UVALive
Guardian of Decency UVALive
Redis Server监控
查看mysql二进制文件(binlog文件)
mysql主从复制错误:A slave with the same server_uuid/server_id as this slave has connected to the master;
原文地址:https://www.cnblogs.com/nasdaqhe/p/542053.html
最新文章
Spring声明式事务配置管理方法
Spring----01. 入门知识,IoC/DI
Spring IOC基础
jQuery的三种$()
Struts2文件上传
Struts2.0中ActionInvocation使用
SQL的主键和外键的作用
Python GIL(Global Interpreter Lock)
进程之生产者消费者模型
并发编程之多进程
热门文章
进程理论基础
操作系统基础知识
基于UDP协议通信的套接字
网络编程之粘包
基于TCP协议通信的套接字
TCP协议三次握手、四次挥手
计算机网络基础知识
线性规划与网络流24题第2题 太空飞行计划 最大权闭合图
hdu1569 方格取数(2) 最大点权独立集=总权和-最小点权覆盖集 (最小点权覆盖集=最小割=最大流)
Acme Corporation UVA
Copyright © 2011-2022 走看看