Attributes.Add用途与用法
来源:互联网 发布:免费点餐软件 编辑:程序博客网 时间:2024/04/29 22:29
Attributes.Add("javascript事件","javascript语句");
如:
this.TextBox1.Attributes.add("onblue", "window.Label1.style.backgroundColor='#000000';");
this.TextBox1.Attributes.Add("onblur","this.style.display='none'");
javascript事件:
onClick 鼠标点击事件,多用在某个对象控制的范围内的鼠标点击
onDblClick 鼠标双击事件
onMouseDown 鼠标上的按钮被按下了
onMouseUp 鼠标按下后,松开时激发的事件
onMouseOver 当鼠标移动到某对象范围的上方时触发的事件
onMouseMove 鼠标移动时触发的事件
onMouseOut 当鼠标离开某对象范围时触发的事件
onKeyPress 当键盘上的某个键被按下并且释放时触发的事件.[注意:页面内必须有被聚焦的对象]
onKeyDown 当键盘上某个按键被按下时触发的事件[注意:页面内必须有被聚焦的对象]
onKeyUp 当键盘上某个按键被按放开时触发的事件[注意:页面内必须有被聚焦的对象]
Attributes.Add添加多了之后会影响一定速度,Attributes和Attributes.CssStyle被自动保存到ViewState中后,除了ViewState体积急增后,PostBack时Load ViewState的负担也同时增大了。
在下面的事件中添加,如下形式:
protected override void Render(HtmlTextWriter output)
{
this.Attributes["abc"] = "123";
this.Attributes.CssStyle["abc-style"] = "123-style";
output.Write(Text);
}
就不会再将Attributes和Attributes.CssStyle保存到ViewState中
- Attributes.Add用途与用法
- Attributes.Add用途与用法
- Attributes.add
- Attributes.Add
- Attributes.Add()
- LD_ASSUME_KERNEL用途与用法
- AttributeCollection类与Attributes.Add方法的使用
- ASP.NET 验证控件与Attributes.Add 脚本并存
- AttributeCollection类与Attributes.Add方法的使用[转载]
- const的用途与用法
- static的用法与用途
- #ifdef的用法与用途
- Attributes.Add() Attributes.Remove() Style.Add() Style.Remove()
- 用Attributes.Add添加事件
- Button1.Attributes.Add()方法小结
- 用Attributes.Add添加事件
- Button1.Attributes.Add()方法小结
- Button1.Attributes.Add()方法小结
- msgctl()函数
- jqGrid基础学习:4jqGrid的ColModel API 中文详解
- SQL MAX() 函数、SQL MIN() 函数
- cc视频助阵:2011年中国互联网大会盛夏8月即将在京召开
- 敏捷软件测试的七个关键成功要素
- Attributes.Add用途与用法
- SQL SUM() 函数、SQL GROUP BY 语句、SQL HAVING 子句
- 搭建struts2的开发环境
- 设计模式 学习之工厂方法模式
- Directx 3D - 3D视图空间和投影
- php的301跳转代码处理
- Jquery easy ui datagrid 的编辑功能
- ActiveX控件打包成Cab置于网页中自动下载安装补充!
- 简明Python教程