Chinaunix

标题: js 日历控件 [打印本页]

作者: 超人慢慢飞    时间: 2011-12-20 09:48
标题: js 日历控件
js日历控件,效果如下:
代码见附件 cal.rar   
调用:
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

  2. <html xmlns="http://www.w3.org/1999/xhtml" >
  3. <head runat="server">
  4.     <title>无标题页</title>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=gbk" />
  6.     <link href="cal.css" rel="stylesheet" type="text/css" />
  7.    
  8. </head>
  9. <body>
  10.     <form id="form1" runat="server">
  11.     <div id="append_parent"></div>
  12.     <div>
  13.     <input type="text" id="bday" name="bday" size="25" onclick="showcalendar(event, this)" onfocus="showcalendar(event, this);if(this.value=='0000-00-00')this.value=''" value="0000-00-00" tabindex="20" />
  14.     </div>
  15.      <script language="javascript" type="text/javascript" src="calendar.js" charset="gbk">
  16.     </script>
  17.     </form>
  18. </body>
  19. </html>





欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2