Copiar código del código de la siguiente manera:
<div>
<select name = "yyyy" onchange = "yyyymm (this.value)" >>
<opción valor = ""> Seleccione el año </ppection>
</select>
<select name = "mm" onchange = "mmdd (this.value)">
<opción valor = ""> Seleccione Moon </ppection>
</select>
<Seleccionar nombre = "" "
<opción valor = ""> Seleccione Día </opción>
</select>
</div>
<script language = "javaScript">
función window.onload () {
Stryyyy = document.form1.yyyy.outerhtml;
strmm = document.form1.mm.outerhtml;
strdd = document.form1.dd.outerhtml;
Monhead = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
// Damos el contenido del año del año.
var y y = nueva fecha ().
var str = stryyyyy.substring (0, stryyyyyyyyyyy -longitud -9);
para (var i = (y -30); i <(y+30); i ++) // Este año prevalece, los primeros 30 años, los próximos 30 años
{{
str + = "<option value = '" + i + "'>" + i + "año" + "</opción>/r/n";
}
document.form1.yyyy.outerhtml = str + "</select>" ";
// El cuadro de caída de FUyue
var str = strmm.substring (0, strmm.length -9);
para (var i = 1; i <13; i ++) {
str + = "<option value = '" + i + "'>" + i + "mes" + "</opción>/r/n";
}
document.form1.mm.outerhtml = str + "</select>" ";
document.form1.yyyy.value = y;
document.form1.mm.value = new Date ().
var n = Monhead [nueva fecha ().
if (new Date (). getMonth () == 1 && ispinyear (aaa yyyyvalue) n ++;
Writeay (n);
document.form1.dd.value = new Date ().
}
Función yyyymm (str) // La fecha cambia cuando cambia el año (juzga principalmente el año del ping)
{{
var mmValue = document.form1.mm.option
if (mmValue == "") {dd.outerhtml = strdd;
var n = Monhead [mmValue - 1];
if (mmValue == 2 && ispinyear (str)) n ++;
Writeday (N)
}
Función mmdd (str) // enlace de fecha de cambio mensual
{{
VaryyyValue = document.form1.yyyy.options [document.form1.yyyy.selectedEx].
if (str == "") {dd.outerhtml = strdd;
var n = Monhead [str -1];
if (str == 2 && ispinyear (yyyyvalue) n ++;
Writeday (N)
}
Function writeday (n) // El cuadro de caída de la fecha de la fecha de escritura
{{
var s = strdd.substring (0, strdd.length -9);
para (var i = 1; i <(n+1); i ++)
s + = "<option value = '" + i + "'>" + i + "" + "</option>/r/n";
document.form1.dd.outerhtml = s + "</select>" ";
}
Función ispinyear (año) // juzgar si debe aplanar el año
{{
Retorno (0 == año % 4 && (año % 100! = 0 || año % 400 == 0))
}