引号中的是javascript(默认地,网页通常会使用第一个脚本使用的语言,基本上都是javascript),但是你写的根本不是javascript。你可以在浏览器上取得“源代码”,保存成一个html文件,然后在本地修改你代码中写的javascript代码部分。等你知道该怎样写那个javascript,再更新回aspx中。先学html和javascript,不然你把你程序中html基础部分的问题说成是asp.net部分的问题,总也找不着北。

解决方案 »

  1.   

    你要到html中去检查客户端问题。vs也可以调试html中的脚本,调试你的javascript变量声明作用域,属性大小写,等等。
      

  2.   

    If e.Item.ItemType = ListItemType.Item = True Or e.Item.ItemType = ListItemType.AlternatingItem = True Then
                e.Item.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#6699ff'")
                e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor=c")        End If