| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1873 人关注过本帖
标题:关于日期录入问题
只看楼主 加入收藏
hanbing1984
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2014-12-24
结帖率:66.67%
收藏
已结贴  问题点数:10 回复次数:3 
关于日期录入问题
本人无基础菜鸟一枚,想问下各位大侠,在信息录入界面,在录入日期时,如何实现不用手动输入日期,通过下拉菜单选择就行!
搜索更多相关主题的帖子: 如何 信息 
2015-01-20 10:16
hu9jj
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
来 自:红土地
等 级:贵宾
威 望:400
帖 子:11773
专家分:43421
注 册:2006-5-13
收藏
得分:5 
1、可以下载日期控件;
2、也可以通过设置下拉列表框来分别选择年、月、日。

活到老,学到老!http://www.(该域名已经被ISP盗卖了)E-mail:hu-jj@
2015-01-20 11:14
hanbing1984
Rank: 1
等 级:新手上路
帖 子:8
专家分:0
注 册:2014-12-24
收藏
得分:0 
回复 2楼 hu9jj
怎么设置啊。。。。。
2015-01-20 12:02
m15235394045
Rank: 1
等 级:新手上路
帖 子:2
专家分:5
注 册:2015-1-23
收藏
得分:5 
调用语句:<input name="sj" size="15" readonly onClick="JavaScript:window.open('date.asp(调用文件名)?form=form1(表名)&field=sj(表单字段名)&oldDate='+this.value,'','directorys=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,width=250,height=200,top=220,left=250');">
''''''''''''''
date.asp 文件内容:
<%@ LANGUAGE = VBScript.Encode %>
<html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  <title>选择日期                </title>
   <style type=text/css>
    <!--
    body{margin:0;font-size:9pt;color:#5E639B}
    td{font-size:9pt;color:#000000}
    a:link {color:#000000;text-decoration: none}
    a:visited {color:#000000;text-decoration: none}
    a:active {color:#000000;text-decoration: none}
    a:hover { color:#ff3333;text-decoration: none}
    -->
   </style>
    <Script  Language="vbScript">
    function getDay(v)
   
      window.opener.document.form1.csrqi.value=v
      
      window.close()
      
      end function
   
   </Script>
 </head>
 <body bgcolor=#ffffff onBlur="window.focus()">
<%
oldDate=request("oldDate")
if not isDate(oldDate) then oldDate=date
yy=year(cdate(oldDate))
mm=month(cdate(oldDate))
if request("yy")<>"" then yy=request("yy")
if request("mm")<>"" then mm=request("mm")
if yy="" then yy=year(date)
if mm="" then mm=month(date)
if mm>12 then mm=1:yy=yy+1
if mm<1 then mm=12:yy=yy-1

dim m(12)
m(1)=31
m(3)=31
m(5)=31
m(7)=31
m(8)=31
m(10)=31
m(12)=31
m(2)=28
m(4)=30
m(6)=30
m(9)=30
m(11)=30
if (yy mod 4=0 and yy mod 100<>0) or yy mod 400=0 then m(2)=29
mms=m(mm)
week1=(weekday(cdate(yy & "-" & mm & "-1"))-1)

%>
     <table width=250 cellspacing=1 cellpadding=0 bgcolor=#FFDFDF align=center>
      <tr>
       <td colspan=7 align=center>
        <table width=100% height=20 cellspacing=0 cellpadding=0>
         <tr height=20>
          <td width=30 align=center>
           <a href=date.asp?form=<%=request("form")%>&field=<%=request("field")%>&yy=<%=(yy-1)%>&mm=<%=mm%>>
            <font face=webdings style=color:#000000 title="上一年">7</font>
           </a>
          <td width=30 align=center>
           <a href=date.asp?form=<%=request("form")%>&field=<%=request("field")%>&mm=<%=(mm-1)%>&yy=<%=yy%>>
            <font face=webdings style=color:#000000 title="上一月">3</font>
           </a>
          <td width=130 align=center style="FONT:9pt Verdana,Geneva,sans-serif;color:#CD0101">
           <b><%=yy%> 年 &nbsp; <%=mm%> 月</b>
          <td width=30 align=center>
           <a href=date.asp?form=<%=request("form")%>&field=<%=request("field")%>&mm=<%=(mm+1)%>&yy=<%=yy%>>
            <font face=webdings style=color:#000000 title="下一月">4</font>
           </a>
          <td width=30 align=center>
           <a href=date.asp?form=<%=request("form")%>&field=<%=request("field")%>&yy=<%=(yy+1)%>&mm=<%=mm%>>
            <font face=webdings style=color:#000000 title="下一年">8</font>
           </a>
        </table>
      <tr bgcolor=#ffffff height=20>
       <td width=35 align=center bgcolor=#FFF4F4 style=color:#ff6633>日
       <td width=35 align=center bgcolor=#FFF4F4>一
       <td width=35 align=center bgcolor=#FFF4F4>二
       <td width=35 align=center bgcolor=#FFF4F4>三
       <td width=35 align=center bgcolor=#FFF4F4>四
       <td width=35 align=center bgcolor=#FFF4F4>五
       <td width=35 align=center bgcolor=#FFF4F4>六
<%
if week1<>0 then
 response.write "<tr>"
  for i=1 to week1
   response.write "<td width=35 height=20 bgcolor=#ffffff>&nbsp;"
  next
end if
for i=1 to mms
 if (i+week1-1) mod 7=0 then response.write "<tr>"
 response.write "<td width=35 height=20 align=center bgcolor=#ffffff>"
 if cdate(yy & "-" & mm & "-" & i)=date() then
%>
<input type=button value=<%=i%>
 style="BORDER:#CD0101 1px groove;width:30;height:16;font-size:9pt;background-color:#FFD9D9;color:#CD0101"
 onclick="javascript:getDay('<%=yy%>-<%=mm%>-<%=i%>');" title="<%=yy%>年<%=mm%>月<%=#@~^AQAAAA==raQAAAA==^#~@%>日(今天)">
<%
 else
%>
<input type=button value=<%=i%>
 style="BORDER:#000000 1px groove;width:30;height:16;font-size:9pt;background-color:#ffffff;color:#000000"
 onclick="javascript:getDay('<%=yy%>-<%=mm%>-<%=i%>');" title="<%=yy%>年<%=mm%>月<%=#@~^AQAAAA==raQAAAA==^#~@%>日">
<%
 end if
next
if (mms+week1) mod 7<>0 then
 for i=1 to (7-((mms+week1) mod 7))
  response.write "<td width=35 height=20 bgcolor=#ffffff>&nbsp;"
 next
end if
%>
     </table><br>
<div align=center><a href="javascript:window.close()">〖关闭本窗口〗</a></div>
 </body>
</html>

2015-01-23 16:43
快速回复:关于日期录入问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.014726 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved