欢迎光临
我们一直在努力

非常好用的日期选择器,建议入精华 <一> 有演示

建站超值云服务器,限时71元/月

共六个文件
1。calendar.htm
2。selectdate.html
3。getdate.asp
4。calendar.js
5。cele_date.js
6。fpopupcalendardlg.js

下面为具提代码

1。calendar.htm

<html><head><title>日期选择</title>
<meta content="text/html; charset=gb2312" http-equiv=content-type>
<meta content="mshtml 5.00.2014.210" name=generator></head>
<script src="calendar.js"></script>
<body bgcolor=#3366cc onload=fload()>

<script>
function fload()
{
    fpopcalendar(document.all.txt1, document.all.txt1);
}

function fkeydown()
{
    if(event.keycode==27){
        event.returnvalue = null;
        window.returnvalue = null;
        window.close();
    }
}

document.onkeydown=fkeydown;
</script>
<input id=txt1 style="display: none"> </body></html>

2。selectdate.html

<html><head><title>date</title>
<meta content="text/html; charset=gb2312" http-equiv=content-type>
<script language=javascript src="cele_date.js"></script>
<script src="fpopupcalendardlg.js"></script>
<script language=javascript>
function timecheck(){
    with (document.form1)
    {
        if (v_datebegin.value=="")
        {
            alert("起始时间选择不能为空!");
            v_datebegin.value="2002-1-1";
        }
        else
        {
            if (v_dateend.value=="")
            {
                alert("结束时间选择不能为空!");
                v_dateend.value="2002-12-31";
            }
            else
            {
                submit();
            }
        }
    }
}
</script>          
</head>
<body bgcolor=#ffffff>
            <form action=getdate.asp id=form1 method=post name=form1>
       从 <input maxlength=10 name=v_datebegin  size=10  
                  value=2002-5-3> <input name=button12 onclick="fpopupcalendardlg(v_datebegin);return false" type=button value=">>">  
                  到 <input maxlength=10 name=v_dateend  size=10  
                  value=2002-5-23> <input name=button13 onclick="fpopupcalendardlg(v_dateend);return false" type=button value=">>">  
<input id=submit1 name=submit1 onclick=timecheck() type=button value="查 询">  
     
</body></html>

3。getdate.asp

你选择的日期:从<%=request.form("v_datebegin")%> 到<%=request.form("v_dateend")%>

由于比较长,下一帖继续

演示:  http://www.cnaspol.com/selectdate/selectdate.html

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 非常好用的日期选择器,建议入精华 <一> 有演示
分享到: 更多 (0)

相关推荐

  • 暂无文章