값 넘겨주기 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년 전 조회 861
11년 전 조회 1,250
11년 전 조회 919
11년 전 조회 510
11년 전 조회 626
11년 전 조회 1,091
11년 전 조회 1,163
11년 전 조회 1,167
11년 전 조회 1,211
11년 전 조회 824
11년 전 조회 912
11년 전 조회 3,692
11년 전 조회 1,526
11년 전 조회 470
11년 전 조회 899
11년 전 조회 740
11년 전 조회 2,123
11년 전 조회 611
11년 전 조회 794
11년 전 조회 491
11년 전 조회 878
11년 전 조회 612
11년 전 조회 919
11년 전 조회 1,617
11년 전 조회 473
11년 전 조회 505
11년 전 조회 1,610
11년 전 조회 1,373
11년 전 조회 1,308
11년 전 조회 697
11년 전 조회 1,413
11년 전 조회 867
11년 전 조회 725
11년 전 조회 899
11년 전 조회 1,009
11년 전 조회 1,096
11년 전 조회 1,042
11년 전 조회 3,766
11년 전 조회 2,705
11년 전 조회 826
11년 전 조회 1,274
11년 전 조회 4,906
11년 전 조회 1,739
11년 전 조회 1,107
11년 전 조회 769
11년 전 조회 1,315
11년 전 조회 1,342
11년 전 조회 1,004
11년 전 조회 523
11년 전 조회 763
11년 전 조회 639
11년 전 조회 924
11년 전 조회 1,346
11년 전 조회 1,364
11년 전 조회 558
11년 전 조회 1,178
11년 전 조회 925
11년 전 조회 681
11년 전 조회 4,806
11년 전 조회 4,381
11년 전 조회 858
11년 전 조회 4,206
11년 전 조회 3,876
11년 전 조회 4,234
11년 전 조회 5,016
11년 전 조회 4,685
11년 전 조회 4,239
11년 전 조회 717
11년 전 조회 5,630
11년 전 조회 1,447
11년 전 조회 936
11년 전 조회 2,948
11년 전 조회 872
11년 전 조회 2,613
11년 전 조회 2,222
11년 전 조회 1,318
11년 전 조회 1,559
11년 전 조회 887
11년 전 조회 2,026
11년 전 조회 807
11년 전 조회 5,311
11년 전 조회 2,173
11년 전 조회 3,286
11년 전 조회 884
11년 전 조회 1,063
11년 전 조회 938
11년 전 조회 1,545
11년 전 조회 862
11년 전 조회 1,507
11년 전 조회 4,191
11년 전 조회 1,954
11년 전 조회 1,907
11년 전 조회 5,868
11년 전 조회 1,836
11년 전 조회 2,700
11년 전 조회 2,345
11년 전 조회 1,007
11년 전 조회 3,101
11년 전 조회 2,442
11년 전 조회 5,802
🐛 버그신고