日期:2014-05-16 浏览次数:20387 次
<script language="javascript"> var MonthData = new Array(31,0,31,30,31,30,30,31,30,31,30,31); function change() { var date =new Date(); TextBox_StartDate.value = date.getMonth()+1 + "/1/" + date.getFullYear(); if(month = 1) month = (date.getFullYear()%4==0)?29:28; else month = MonthData[month]; TextBox_EndDate.value =date.getMonth()+1+ "/"+month+"/" + date.getFullYear(); } </script> <INPUT type="button" value="Button" id=button1 name=button1 onClick="change()"> <INPUT type="text" name="TextBox_StartDate" value=""> <INPUT type="text" name="TextBox_EndDate" value="">