calendar.aspx
上传用户:lanchensha
上传日期:2022-02-27
资源大小:7530k
文件大小:2k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. <%@ Page language="c#" AutoEventWireup="true" UICulture="auto" Culture="auto"%>
  2. <%@ Import Namespace="DotNetTextBox" %>
  3. <html>
  4. <head>
  5. <title>date</title>
  6. <meta http-equiv="pragma" content="no-cache" />
  7. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  8. <base target="_self" />
  9. <style type="text/css">
  10. body,a,table,input,button{font-size:12px;font-family:宋体,Verdana,Arial}
  11. </style>
  12. <script runat="server" language="C#">
  13. private void Page_Load(object sender, System.EventArgs e)
  14. {
  15.     if (Request.Cookies["languages"] != null)
  16.     {
  17.         ResourceManager.SiteLanguageKey = Request.Cookies["languages"].Value;
  18.     }
  19.     else
  20.     {
  21.         ResourceManager.SiteLanguageKey = HttpContext.Current.Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"].ToLower().Split(',')[0];
  22.     }
  23. }
  24.     protected void Calendar1_SelectionChanged(object sender, EventArgs e)
  25.     {
  26.         ClientScript.RegisterStartupScript(typeof(Page), "Key", "insertDate('" + Calendar1.SelectedDate.ToString("yyyy-MM-dd") + "');", true);
  27.     }
  28. </script>
  29. <script type="text/javascript">
  30. Request = {
  31.  QueryString : function(item){
  32.   var svalue = location.search.match(new RegExp("[?&]" + item + "=([^&]*)(&?)","i"));
  33.   return svalue ? svalue[1] : svalue;
  34.  }
  35. }
  36. function insertDate(strCode)
  37. {
  38.   parent.inserObject(parent.document.getElementById(Request.QueryString("name")).contentWindow,'nowdate',strCode);
  39.   parent.popupmenu.hide();
  40.   parent.rcmenu.hide();
  41. }
  42. </script>
  43. </head>
  44. <body topmargin="2" bgcolor="#f9f8f7">
  45. <form runat=server>
  46.     <asp:Calendar ID="Calendar1" runat="server" BackColor="#F9F8F7" BorderColor="White"
  47.         BorderWidth="1px" Font-Names="Verdana"
  48.         Font-Size="9pt" ForeColor="Black" Height="200px" Width="220px" OnSelectionChanged="Calendar1_SelectionChanged" NextPrevFormat="FullMonth" ShowGridLines="True" BorderStyle="Dashed">
  49.         <SelectedDayStyle BackColor="#333399" ForeColor="White" />
  50.         <TodayDayStyle BackColor="#CCCCCC" />
  51.         <OtherMonthDayStyle ForeColor="#999999" />
  52.         <NextPrevStyle Font-Size="8pt" ForeColor="#333333" Font-Bold="True" VerticalAlign="Bottom" />
  53.         <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
  54.         <TitleStyle BackColor="White" Font-Bold="True"
  55.             Font-Size="12pt" ForeColor="#333399" BorderColor="Black" BorderWidth="1px" BorderStyle="Dotted" />
  56.     </asp:Calendar><input onclick="parent.popupmenu.hide();" type="button" value='<%=ResourceManager.GetString("close")%>' /></form>
  57. </body></html>