2、在“gridview1_rowdatabound ”方法下加入下列代碼:
 if (e.row.rowtype == datacontrolrowtype.datarow)
if (e.row.rowtype == datacontrolrowtype.datarow)
 ...{
...{ //鼠標移動到每項時顏色交替效果
      //鼠標移動到每項時顏色交替效果 e.row.attributes.add("onmouseout", "this.style.backgroundcolor='white';this.style.color='#003399'");
   e.row.attributes.add("onmouseout", "this.style.backgroundcolor='white';this.style.color='#003399'"); e.row.attributes.add("onmouseover", "this.style.backgroundcolor='#6699ff';this.style.color='#8c4510'");
      e.row.attributes.add("onmouseover", "this.style.backgroundcolor='#6699ff';this.style.color='#8c4510'");            
 }
 }
新聞熱點
疑難解答
圖片精選