JS obtains the current date and time and my JQ examples about the date <br/> var mydate = new date (); <br/> mydate. getyear (); // obtain the current year (2 digits) <br/> mydate. getfullyear (); // obtain the complete year (4 digits, 1970 -????) <Br/> mydate. getmonth (); // obtain the current month (0-11, 0 represents January) <br/> mydate. getdate (); // obtain the current day (1-31) <br/> mydate. getday (); // get X of the current week (0-6, 0 represents Sunday) <br/> mydate. gettime (); // obtain the current time (milliseconds starting from 1970.1.1) <br/> mydate. gethours (); // obtain the current hour (0-23) <br/> mydate. getminutes (); // get the current number of minutes (0-59) <br/> mydate. getseconds (); // obtain the current number of seconds (0-59) <br/> mydate. getmilliseconds (); // obtain the current number of milliseconds (0-999) <br/> mydate. tolocaledatestring (); // obtain the current date <br/> var mytime = mydate. tolocaletimestring (); // obtain the current time <br/> mydate. tolocalestring (); // obtain the date and time <br/> // the number of days in the current month <br/> var curmonthdays = new date (mydate. getfullyear (), (mydate. getmonth () + 1), 0 ). getdate (); <br/> */<br/> current month days <br/> var curmonthdays = new date (mydate. getfullyear (), (mydate. getmonth () + 1), 0 ). getdate (); <br/> JQ is used to generate year, month, and day drop-down box data. positioning is supported. <br/> JS part: <br/> var year = 2005; <br/> var month = 12; <br/> var day = 20; <br/> {literal} <br/> $ (document ). ready (function () {<br/> set_date_select (year, month, day); <br/> $ ('# month '). change (function () {<br/> var tmp_year = $ ("# year "). val (); <br/> var tmp_month = $ ("# month "). val (); <br/> set_date_select (tmp_year, tmp_month, 0); <br/>}); <br/> function set_date_select (year, month, day) {<br/> $ ("# year "). empty (); <br/> $ ("# month "). empty (); <br/> $ ("# Day "). empty (); <br/> // year <br/> var mydate = new date (); <br/> var year_num = mydate. getfullyear ()-1900 + 1; <br/> for (VAR I = 0; I <year_num; I ++) {<br/> var tmp_year = 1900 + I; <br/> If (tmp_year = year) <br/> $ ('# year '). append ("<option value = '" + tmp_year + "'selected = 'selected'>" + tmp_year + "</option> "); <br/> else <br/> $ ('# year '). append ("<option value = '" + tmp_year + "'>" + tmp_year + "</option> "); <br/>}< br/> // month <br/> for (VAR I = 1; I <= 12; I ++) {<br/> if (I = month) <br/> $ ('# month '). append ("<option value = '" + I + "'selected = 'selected'>" + I + "</option> "); <br/> else <br/> $ ('# month '). append ("<option value = '" + I + "'>" + I + "</option> "); <br/>}< br/> // number of days in the current month <br/> var curmonthdays = 31; <br/> If (month> 0 & month <= 12) {<br/> var curmonthdays = new date (mydate. getfullyear (), (month), 0 ). getdate (); <br/>}< br/> // day <br/> for (VAR I = 1; I <= curmonthdays; I ++) {<br/> if (I = day) <br/> $ ('# Day '). append ("<option value = '" + I + "'selected = 'selected'>" + I + "</option> "); <br/> else <br/> $ ('# Day '). append ("<option value = '" + I + "'>" + I + "</option> "); <br/>}< br/> HTML section: <br/> <select name = "year" id = "year"> </SELECT> <br/> <select name = "month" id = "month"> </ select> <br/> <select name = "day" id = "day"> </SELECT>