2024/03/07 초기화 기능 수정

This commit is contained in:
kmg 2024-03-07 14:49:38 +09:00
parent b409a32f3e
commit 1467f69802
10 changed files with 98 additions and 71 deletions

View File

@ -167,14 +167,10 @@
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);
}
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}

View File

@ -341,7 +341,13 @@
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
});
}

View File

@ -73,14 +73,10 @@
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);
}
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}

View File

@ -166,21 +166,13 @@
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).attr('type') == 'checkbox') {
$(this).prop('checked', false);
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
}
});
}

View File

@ -163,6 +163,19 @@
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
});
}
</script>
<title>과정신청기간관리목록</title>
</head>

View File

@ -169,7 +169,18 @@
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
});
}
</script>
<title>과정신청기간관리목록</title>

View File

@ -138,6 +138,19 @@
}
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
});
}
</script>
<title>교육과정관리</title>
</head>

View File

@ -95,6 +95,18 @@
} */
function fncReset(thisObj){
var targetObj = $(thisObj).closest('.list_top').find('select,input');
$.each(targetObj, function(){
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
});
}
</script>
<title>교육문의</title>

View File

@ -166,21 +166,13 @@
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).attr('type') == 'checkbox') {
$(this).prop('checked', false);
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}
}
});
}

View File

@ -51,14 +51,10 @@
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);
}
console.log($(this))
if ($(this).prop("tagName") == 'SELECT') {
// 초기화 시 무조건 select option 첫번째 지정
$(this).find("option:first-child").prop("selected",true)
} else {
$(this).val('');
}