2017-08-04 29 views
0
<asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="White" 
     BorderWidth="1px" Font-Names="Verdana" Font-Size="9pt" ForeColor="Black" OnDayRender="Calendar1_DayRender" 
     OnSelectionChanged="Calendar1_SelectionChanged" OnVisibleMonthChanged="Calendar1_VisibleMonthChanged" 
     Height="190px" Style="margin-left: 168px;" NextPrevFormat="FullMonth" 
     Width="423px"> 
     <SelectedDayStyle BackColor="#333399" ForeColor="White" /> 
     <TodayDayStyle BackColor="#CCCCCC" /> 
     <OtherMonthDayStyle ForeColor="#999999" /> 
     <NextPrevStyle Font-Size="8pt" ForeColor="#333333" Font-Bold="True" VerticalAlign="Bottom" /> 
     <DayHeaderStyle Font-Bold="True" Font-Size="8pt" /> 
     <TitleStyle BackColor="White" Font-Bold="True" Font-Size="12pt" ForeColor="#333399" 
      BorderColor="Black" BorderWidth="4px" /> 
    </asp:Calendar> 

我有一個壓光控制如上,我想通過JavaScript函數來顯示一個彈出消息,當我們點擊任何日期。如何呼籲壓延控制的天SelectionChanged事件JavaScript函數在asp.net

回答

0

簡稱爲:

$(document.body).on('click', '#Calendar1 tbody tr td', function(event){ 
alert("my message..."); 
//... other code if needed 
});