값 넘겨주기 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년 전 조회 923
11년 전 조회 1,312
11년 전 조회 982
11년 전 조회 579
11년 전 조회 685
11년 전 조회 1,148
11년 전 조회 1,228
11년 전 조회 1,228
11년 전 조회 1,276
11년 전 조회 887
11년 전 조회 971
11년 전 조회 3,756
11년 전 조회 1,585
11년 전 조회 531
11년 전 조회 955
11년 전 조회 800
11년 전 조회 2,173
11년 전 조회 670
11년 전 조회 855
11년 전 조회 550
11년 전 조회 936
11년 전 조회 678
11년 전 조회 980
11년 전 조회 1,672
11년 전 조회 530
11년 전 조회 561
11년 전 조회 1,667
11년 전 조회 1,434
11년 전 조회 1,366
11년 전 조회 752
11년 전 조회 1,467
11년 전 조회 923
11년 전 조회 782
11년 전 조회 954
11년 전 조회 1,057
11년 전 조회 1,148
11년 전 조회 1,093
11년 전 조회 3,817
11년 전 조회 2,758
11년 전 조회 874
11년 전 조회 1,333
11년 전 조회 4,953
11년 전 조회 1,785
11년 전 조회 1,162
11년 전 조회 816
11년 전 조회 1,368
11년 전 조회 1,392
11년 전 조회 1,053
11년 전 조회 577
11년 전 조회 817
11년 전 조회 692
11년 전 조회 975
11년 전 조회 1,396
11년 전 조회 1,404
11년 전 조회 605
11년 전 조회 1,233
11년 전 조회 974
11년 전 조회 717
11년 전 조회 4,855
11년 전 조회 4,427
11년 전 조회 914
11년 전 조회 4,241
11년 전 조회 3,899
11년 전 조회 4,259
11년 전 조회 5,063
11년 전 조회 4,738
11년 전 조회 4,285
11년 전 조회 764
11년 전 조회 5,674
11년 전 조회 1,489
11년 전 조회 983
11년 전 조회 2,980
11년 전 조회 912
11년 전 조회 2,637
11년 전 조회 2,258
11년 전 조회 1,363
11년 전 조회 1,606
11년 전 조회 924
11년 전 조회 2,066
11년 전 조회 847
11년 전 조회 5,348
11년 전 조회 2,213
11년 전 조회 3,325
11년 전 조회 924
11년 전 조회 1,105
11년 전 조회 981
11년 전 조회 1,586
11년 전 조회 906
11년 전 조회 1,550
11년 전 조회 4,230
11년 전 조회 1,998
11년 전 조회 1,948
11년 전 조회 5,910
11년 전 조회 1,877
11년 전 조회 2,732
11년 전 조회 2,387
11년 전 조회 1,048
11년 전 조회 3,135
11년 전 조회 2,481
11년 전 조회 5,839
🐛 버그신고