|
|
 |
 |
|
|
 |
|
最精致的日历式日期输入控件
|
|
|
|
编辑:华夏媒体 作者:未知 来源:网络 时间:2006-07-29 总浏览量:2420 |
|
文字大小:[ 大 中 小 ]
文字颜色: 双击滚屏/单击停止 |
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [下一页]
|
<HTML> <HEAD> <TITLE>最精致的日历式日期输入控件 (Smart Ver 1.00)</TITLE> </HEAD> <style> body { font-size:12px; font-family:"Tahoma"; } td { font-size:12px; font-family:"Tahoma"; } .inputdate { border:1px solid #7287c6; text-align: center; font-size: 12px; font-style: normal; height: 16px; } </style> <SCRIPT LANGUAGE="JavaScript"> <!-- /******************************************************************** more javascript from http://www.smallrain.net 时间:2004-01-01 作者:Smart 功能:日历式日期选择控件 参数: 说明: 1.输入框直接调用用以下代码 <Script>DateBox("InputName","DateValue")<\/Script> 其中:InputName 为输入日期的文本框.注:不能为空. DateValue 为输入日期的文本框默认日期值.格式为:YYYY-MM-DD.如2004-01-01 此值可以不填或为空.则默认值为当天日期.(客户端) 2.其它"按钮"调用用以下代码 CallDate("InputName") 其中:InputName 为输入日期的文本框.注:不能为空. 修改区 时间: 修改人: 原因: ********************************************************************/ /*基本参数*/ var Frw=106; //日历宽度 var Frh=137; //日历高度 var Frs=4; //影子大小 var Hid=true;//日历是否打开 /*创建框架*/ document.writeln('<Div id=Calendar Author=smart scrolling="no" frameborder=0 style="border:0px solid #EEEEEE ;position: absolute; width: '+Frw+'; height: '+Frh+'; z-index: 0; filter :\'progid:DXImageTransform.Microsoft.Shadow(direction=135,color=#AAAAAA,strength='+Frs+')\' ;display: none"></Div>'); /*取得今日日期*/ function GetTodayDate() { today= new Date(); y= today.getYear(); m= (today.getMonth() + 1); if (m<10) { m='0'+m; } d= today.getDate(); if (d<10) { d='0'+d; } return y+'-'+m+'-'+d } /*输入今天日期*/ function SetTodayDate(InputBox) { HiddenCalendar(); InputBox.value=GetTodayDate(); } /*取某年某月第一天的星期值(月份-1)*/ function GetFirstWeek(The_Year,The_Month) { return (new Date(The_Year,The_Month-1,1)).getDay() } /*取某年某月中总天数*/ function GetThisDays(The_Year,The_Month) { return (new Date(The_Year,The_Month,0)).getDate() } /*取某年某月上个月中总天数*/ function GetLastDays(The_Year,The_Month) { return (new Date(The_Year,The_Month-1,0)).getDate() } /*判断是否是闰年*/ function RunNian(The_Year) { if ((The_Year%400==0) || ((The_Year%4==0) && (The_Year%100!=0))) return true; else return false; } /* 判断日期(YYYY-MM-DD)的日期是否正确 */ function DateIsTrue(asDate){ var lsDate = asDate + "";
|
|
[上一页] [1] [2] [3] [4] [5] [6] [7] [下一页]
|
|
|
打印 收藏 关闭 至顶部 |
|
 |
|