JavaScript 日期联动选择器


Code

<body>

<select id="idYear"></select> 

<select id="idMonth"></select> 

<select id="idDay"></select> 

<br />

斕恁寁腔ㄩ<span id="idShow"></span>

<script>

var ds = new DateSelector("idYear", "idMonth", "idDay", {

MaxYear: new Date().getFullYear() + 2,

onChange: function(){ $("idShow").innerHTML = this.Year + "/" + this.Month + "/" + this.Day; }

});

 

ds.onChange();

</script>

</body>

posted @ 2008-11-25 13:30  Nina  阅读(310)  评论(0编辑  收藏  举报