<Marble:blog runat="server"/>
死活不行啊,原来想这样的人好多啊http://weblogs.asp.net/fmarguerie/archive/2003/02/27/3103.aspx
http://unboxedsolutions.com/sean/archive/2004/05/04/213.aspxhttp://support.microsoft.com/default.aspx?scid=kb;en-us;309338&Product=NETFrame后来只有加在CheckBoxList上了,虽然可以用但是发送到客户端的html内是把onclick加到input type =checkbox 外层的table上了
posted on 2004-09-18 15:25 武眉博<活靶子.Net> 阅读(2849) 评论(5) 编辑 收藏 网摘 所属分类: Asp.Net
有办法的,我以前搞过.好像是在CheckBoxList的ItemCreated事件里加attribute 回复 引用 查看
T:Yok CheckBoxList 没有ItemCreated事件 回复 引用
但listBox可以实现 private void Page_Load(object sender, System.EventArgs e) { xxx.Items .Add("aaa"); xxx.Items .Add("bbb"); xxx.Attributes .Add("ondblclick","aaa()"); } <script> function aaa() { var list=window.document .all .xxx; for(var i=0;i<list.options.length;i++) { if (list.options[i].selected==true) window.alert(list.options[i].text); } } </script> 回复 引用
To 2002pine你的Attribute不是加到ListItem上 回复 引用
试试这么做: listitem.Text="<LABEL title='" +listitem.Text +"'>" +listitem.Text +"</LABEL>"; :) 回复 引用
昵称: [登录] [注册]
主页:
邮箱:(仅博主可见)
验证码: 看不清,换一个
评论内容:
登录 注册
[使用Ctrl+Enter键快速提交评论]
@楼上的:
有地址啊,没看到么?