소스 한번만 봐주세요 ㅠ_ㅠ어디에서 문제가 되는거죠?

소스 한번만 봐주세요 ㅠ_ㅠ어디에서 문제가 되는거죠?

QA

소스 한번만 봐주세요 ㅠ_ㅠ어디에서 문제가 되는거죠?

본문

소스 한번만 봐주세요 ㅠ_ㅠ

짜집기한 소스라 어디에서 문제가 되는건지 잘 모르겠어요..

 

 

 


<script>
    function room_choice(text_value){
        var num_value = '';
        if(text_value=='2인실'){
            num_value = 280000;
        }else if(text_value=='4인실'){
            num_value = 190000;
        }
        document.querySelector("#select1_num").value = num_value;
    }
    function family_num(text_value){
        var num_value = '';
        if(text_value=='본인'){
            num_value = 1;
        }else if(text_value=='본인과 배우자'){
            num_value = 2;
        }else if(text_value=='3인 가족'){
            num_value = 3;
        }else if(text_value=='4인 가족'){
            num_value = 4;
        }else if(text_value=='5인 가족'){
            num_value = 5;
        }
        document.querySelector("#select2_num").value = num_value;
    }
    function itemSum(frm){
        var sum = 0;
        var count = frm.chkbox.length;
        for(var i=0; i < count; i++ ){
        if( frm.chkbox[i].checked == true ){
        sum += parseInt(frm.chkbox[i].value);
        }
    }
}
function itemSum(frm)
{
  var select1 = document.querySelector("#select1_num").value;
  var select2 = document.querySelector("#select2_num").value;
  var select3 = frm.querySelectorAll("input:checked").length;
   frm.input4.value = (select2 * select2) - (select2 * select3);
 }
//-->
</script>

이 질문에 댓글 쓰기 :

답변 1

itemSum  이 두개고 { } 도 맞지 않는데 에러가 안나는게 이상하죠

답변을 작성하시기 전에 로그인 해주세요.
전체 123,638 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT