[javascript] select box 년월일 selected
·
Language/JavaScript
var d = new Date(); window.onload = function(){ selectedDateOpt(document.getElementsByName("_year"), d.getFullYear()); selectedDateOpt(document.getElementsByName("_month"),(d.getMonth() + 1)); selectedDateOpt(document.getElementsByName("_date"), d.getDate()); selectedDateOpt(document.getElementsByName("_day"), d.getDay()); }; function selectedDateOpt(seleObj, date){ for(var i=0;i