값 넘겨주기 input 이렇게 쓰는게 맞을까요?

        <tr>
            <th scope="row"><label for="wr_5">정가/할인율<strong class="sound_only">필수</strong></label></th>
            <td><input type="text" name="wr_5" class="box" value="<?php echo $wr_5 ?>" id="wr_5" required class="frm_input required" size="20" maxlength="20"> x
   <input type="text" name="wr_6" class="box" value="<?php echo $wr_6 ?>" id="wr_6" required class="frm_input required" size="10" maxlength="20"> %</td>
        </tr>

<script>
$(".box").onkeypress(function(){
var result=$("input[name='wr_5']").val()+$("input[name='wr_6']").val();
 $("input[name='wr_7'].val(result);//
});
</script>


        <tr>
            <th scope="row"><label for="wr_7">할인가<strong class="sound_only">필수</strong></label></th>
            <td><input type="text" name="wr_7" value="<?php echo $wr_7 ?>" id="wr_7" class="box" required class="frm_input required" size="10" maxlength="20"></td>
        </tr>​

 

 

5 번 6 번 값을 더해서 7번에 바로 보여주기 하고 싶은데요. 저렇게 해봤는데 안되서요.

 

|

댓글 1개

괄호를 하나 안닫으셨네요.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

프로그램

+
제목 글쓴이 날짜 조회
11년 전 조회 879
11년 전 조회 1,264
11년 전 조회 933
11년 전 조회 528
11년 전 조회 639
11년 전 조회 1,108
11년 전 조회 1,182
11년 전 조회 1,184
11년 전 조회 1,231
11년 전 조회 838
11년 전 조회 931
11년 전 조회 3,709
11년 전 조회 1,539
11년 전 조회 486
11년 전 조회 916
11년 전 조회 758
11년 전 조회 2,135
11년 전 조회 628
11년 전 조회 811
11년 전 조회 507
11년 전 조회 891
11년 전 조회 627
11년 전 조회 936
11년 전 조회 1,631
11년 전 조회 490
11년 전 조회 523
11년 전 조회 1,629
11년 전 조회 1,394
11년 전 조회 1,325
11년 전 조회 716
11년 전 조회 1,431
11년 전 조회 883
11년 전 조회 739
11년 전 조회 912
11년 전 조회 1,023
11년 전 조회 1,112
11년 전 조회 1,057
11년 전 조회 3,775
11년 전 조회 2,723
11년 전 조회 841
11년 전 조회 1,289
11년 전 조회 4,918
11년 전 조회 1,754
11년 전 조회 1,122
11년 전 조회 785
11년 전 조회 1,331
11년 전 조회 1,355
11년 전 조회 1,022
11년 전 조회 544
11년 전 조회 778
11년 전 조회 656
11년 전 조회 943
11년 전 조회 1,364
11년 전 조회 1,371
11년 전 조회 573
11년 전 조회 1,193
11년 전 조회 941
11년 전 조회 693
11년 전 조회 4,819
11년 전 조회 4,391
11년 전 조회 871
11년 전 조회 4,212
11년 전 조회 3,882
11년 전 조회 4,241
11년 전 조회 5,028
11년 전 조회 4,700
11년 전 조회 4,252
11년 전 조회 733
11년 전 조회 5,642
11년 전 조회 1,463
11년 전 조회 954
11년 전 조회 2,956
11년 전 조회 885
11년 전 조회 2,622
11년 전 조회 2,229
11년 전 조회 1,334
11년 전 조회 1,573
11년 전 조회 898
11년 전 조회 2,038
11년 전 조회 817
11년 전 조회 5,320
11년 전 조회 2,187
11년 전 조회 3,295
11년 전 조회 900
11년 전 조회 1,081
11년 전 조회 949
11년 전 조회 1,560
11년 전 조회 880
11년 전 조회 1,523
11년 전 조회 4,204
11년 전 조회 1,969
11년 전 조회 1,921
11년 전 조회 5,881
11년 전 조회 1,851
11년 전 조회 2,710
11년 전 조회 2,358
11년 전 조회 1,019
11년 전 조회 3,111
11년 전 조회 2,455
11년 전 조회 5,814
🐛 버그신고