Loading

日期三联下拉框(转自网络+整理)

转载+整理:
 
Code

html代码:

  <td class="font_R">生日</td>
<td>
<select id="ddlYear" runat="server" onchange="YYYYDD(this.value)">
<option value="" selected="selected">请选择 年</option>
</select>
<select id="ddlMonth" runat ="server" onchange="MMDD(this.value)">
<option value="" selected="selected">选择 月</option>
</select>
<select id="ddlDay" runat="server">
<option value="" runat ="server" selected="selected">选择 日</option>
</select>
</td>
……
        var year, month, day;
year = document.getElementById('<%=ddlYear.ClientID %>');
month = document.getElementById('<%=ddlMonth.ClientID %>');
day = document.getElementById('<%=ddlDay.ClientID %>');

YYYYMMDDstart();
"<script type='text/javascript' language ='javascript' >"+
"year.value={0};YYYYDD({0});year.value={0};month.value={1};day.value={2}</script>", dt.Year.ToString(), dt.Month.ToString(), dt.Day.ToString());
posted @ 2009-10-19 14:01  today4king  阅读(489)  评论(0编辑  收藏  举报