2012-03-07 38 views

回答

1

这里有造型的ASP.NET Calendar(含onmouseover-style)一些小技巧,发现here

Protected Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs) Handles Calendar1.DayRender 
Dim onmouseoverStyle As String = "this.style.backgroundColor='#D4EDFF'" 
Dim onmouseoutStyle As String = "this.style.backgroundColor='@BackColor'" 
Dim rowBackColor As String = String.Empty 

e.Cell.Attributes.Add("onmouseover", onmouseoverStyle) 
e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor)) 

If Not e.Day.IsWeekend Then 
    e.Cell.Attributes.Add("onmouseover", onmouseoverStyle) 
    e.Cell.Attributes.Add("onmouseout", onmouseoutStyle.Replace("@BackColor", rowBackColor)) 
End If 

例如,你可以使用jQuery显示工具提示onmouseover

http://flowplayer.org/tools/tooltip/index.html