标题:ASP中会员开始日期与结束日期的问题
只看楼主
porsun
Rank: 1
等 级:新手上路
帖 子:48
专家分:0
注 册:2011-7-4
结帖率:50%
已结贴  问题点数:20 回复次数:1 
ASP中会员开始日期与结束日期的问题
程序代码:
<tr>
        <td height="23" class="td_content">会员开始时间:</td>
        <td class="td_content"><select name="BeginYear" class="input_1" id="BeginYear">
        <%
            For i = ThisYear To ThisYear + 15
                Response.Write("<option value="""& i &""" ")
                If Cint(i) = Cint(selBeginYear) Then Response.Write(" selected")
                Response.Write(">"& i &"</option>")
            Next
        %>
        </select><select name="BeginMonth" class="input_1" id="BeginMonth">
            <%
                For i = 1 To 12
                    Response.Write("<option value="""& i &""" ")
                    If Cint(i) = Cint(selBeginMonth) Then Response.Write(" selected")
                    Response.Write(">"& i &"</option>")
                Next
            %>
            </select><select name="BeginDay" class="input_1" id="BeginDay">
            <%
                For i = 1 To 31
                    Response.Write("<option value="""& i &""" ")
                    If Cint(i) = Cint(selBeginDay) Then Response.Write(" selected")
                    Response.Write(">"& i &"</option>")
                Next
            %>
            </select></td>
    </tr>
    <tr>
        <td height="23" class="td_content">会员结束时间:</td>
        <td class="td_content"><select name="EndYear" class="input_1" id="EndYear">
        <%
            For i = ThisYear To ThisYear + 15
                Response.Write("<option value="""& i &""" ")
                If Cint(i) = Cint(selEndYear) Then Response.Write(" selected")
                Response.Write(">"& i &"</option>")
            Next
        %>
        </select><select name="EndMonth" class="input_1" id="EndMonth">
            <%
                For i = 1 To 12
                    Response.Write("<option value="""& i &""" ")
                    If Cint(i) = Cint(selEndMonth) Then Response.Write(" selected")
                    Response.Write(">"& i &"</option>")
                Next
            %>
            </select><select name="EndDay" class="input_1" id="EndDay">
            <%
                For i = 1 To 31
                    Response.Write("<option value="""& i &""" ")
                    If Cint(i) = Cint(selEndDay) Then Response.Write(" selected")
                    Response.Write(">"& i &"</option>")
                Next
            %>
            </select></td>
    </tr>
这个程序的写法,是直接调用了当前的系统日期,但是如果在数据库中已经存在了日期,如何使得程序读取的是数据库中的日期呢?该怎么改这个程序呢?请赐教,谢谢!
搜索更多相关主题的帖子: 会员 
2012-09-19 14:26
netlin
Rank: 13Rank: 13Rank: 13Rank: 13
等 级:贵宾
威 望:24
帖 子:544
专家分:4308
注 册:2012-4-9
得分:20 
看不出是 调用了当前的系统日期,
只是从三个变量取值。

做自己喜欢的事!
2012-09-19 22:52



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-381668-1-1.html




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

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