diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/instrActvtHstryMngList.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/instrActvtHstryMngList.jsp index 9592a271..244617cf 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/instrActvtHstryMngList.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/adultVisitEdu/instrActvtHstryMngList.jsp @@ -64,23 +64,22 @@ form.action = ""; form.submit(); } - + //초기화 function fncReset(thisObj){ var targetObj = $(thisObj).closest('.list_top').find('select,input'); $.each(targetObj, function(){ - if($(this).prop('tagName') == 'SELECT'){ - if($(this).attr('name').indexOf('Month') != -1){ - $(this).val(new Date().getMonth()+1); - }else if($(this).attr('name').indexOf('Year') != -1){ - $(this).val(new Date().getFullYear()); - }else{ - $(this).prop("selectedIndex", 0); - } - }else{ + if ($(this).prop("tagName") == 'SELECT') { + // 초기화 시 무조건 select option 첫번째 지정 + $(this).find("option:first-child").prop("selected",true); + } else if ($(this).attr('type') == 'radio') { + var radioName = $(this).attr("name"); + var radioFirst = $("[name="+radioName+"]")[0]; + $(radioFirst).prop("checked",true) + } else { $(this).val(''); } - }); - } + }); + } 강사활동확인서신청관리 diff --git a/src/main/webapp/WEB-INF/jsp/oprtn/cpyrgExprnClsrm/oprtnStateMngList.jsp b/src/main/webapp/WEB-INF/jsp/oprtn/cpyrgExprnClsrm/oprtnStateMngList.jsp index daac25bf..ed30dcd7 100644 --- a/src/main/webapp/WEB-INF/jsp/oprtn/cpyrgExprnClsrm/oprtnStateMngList.jsp +++ b/src/main/webapp/WEB-INF/jsp/oprtn/cpyrgExprnClsrm/oprtnStateMngList.jsp @@ -71,7 +71,7 @@ listForm.submit(); } - function fncReset(thisObj){ + /*function fncReset(thisObj){ var targetObj = $(thisObj).closest('.list_top').find('select,input'); $.each(targetObj, function(){ if($(this).prop('tagName') == 'SELECT'){ @@ -90,7 +90,25 @@ } } }); - } + }*/ + + // 캘린더 및 라디오, 체크박스까지 초기화 + function fncReset(thisObj){ + var targetObj = $(thisObj).closest('.list_top').find('select,input'); + $.each(targetObj, function(){ + if ($(this).prop("tagName") == 'SELECT') { + // 초기화 시 무조건 select option 첫번째 지정 + $(this).find("option:first-child").prop("selected",true) + } else if ($(this).attr('type') == 'radio') { + $(this).prop('checked',true); + } else if ($(this).attr('type') == 'checkbox') { + $(this).prop('checked',false); + } else { + $(this).val(''); + } + }); + } + function fnCheckAll(){ var chk = document.listForm.chk;