asp.net与javascript

给html element添加atrribute,包括javascript字符串截取

code snippet:

e.Row.Attributes.Add("onmouseover", "if(this.className.indexOf('project-listitem-selected')<0)this.className+=' project-listitem-mouseover'");
 

e.Row.Attributes.Add("onmouseout", "if(this.className.indexOf('project-listitem-selected')<0)this.className=this.className.substring(0,this.className.indexOf(' project-listitem-mouseover'))");

posted on 2008-08-18 22:19  guojin  阅读(192)  评论(0编辑  收藏  举报