값 넘겨주기 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년 전 조회 960
11년 전 조회 1,347
11년 전 조회 1,017
11년 전 조회 613
11년 전 조회 724
11년 전 조회 1,184
11년 전 조회 1,269
11년 전 조회 1,273
11년 전 조회 1,319
11년 전 조회 923
11년 전 조회 1,008
11년 전 조회 3,788
11년 전 조회 1,618
11년 전 조회 566
11년 전 조회 992
11년 전 조회 844
11년 전 조회 2,215
11년 전 조회 717
11년 전 조회 893
11년 전 조회 587
11년 전 조회 968
11년 전 조회 719
11년 전 조회 1,023
11년 전 조회 1,712
11년 전 조회 573
11년 전 조회 593
11년 전 조회 1,715
11년 전 조회 1,471
11년 전 조회 1,401
11년 전 조회 795
11년 전 조회 1,510
11년 전 조회 960
11년 전 조회 817
11년 전 조회 992
11년 전 조회 1,102
11년 전 조회 1,185
11년 전 조회 1,136
11년 전 조회 3,856
11년 전 조회 2,794
11년 전 조회 914
11년 전 조회 1,375
11년 전 조회 4,995
11년 전 조회 1,824
11년 전 조회 1,202
11년 전 조회 859
11년 전 조회 1,412
11년 전 조회 1,430
11년 전 조회 1,100
11년 전 조회 623
11년 전 조회 853
11년 전 조회 727
11년 전 조회 1,016
11년 전 조회 1,443
11년 전 조회 1,442
11년 전 조회 646
11년 전 조회 1,274
11년 전 조회 1,018
11년 전 조회 755
11년 전 조회 4,896
11년 전 조회 4,471
11년 전 조회 955
11년 전 조회 4,278
11년 전 조회 3,924
11년 전 조회 4,292
11년 전 조회 5,107
11년 전 조회 4,781
11년 전 조회 4,329
11년 전 조회 810
11년 전 조회 5,717
11년 전 조회 1,533
11년 전 조회 1,020
11년 전 조회 3,015
11년 전 조회 961
11년 전 조회 2,678
11년 전 조회 2,301
11년 전 조회 1,402
11년 전 조회 1,646
11년 전 조회 966
11년 전 조회 2,119
11년 전 조회 893
11년 전 조회 5,394
11년 전 조회 2,253
11년 전 조회 3,357
11년 전 조회 962
11년 전 조회 1,148
11년 전 조회 1,019
11년 전 조회 1,626
11년 전 조회 940
11년 전 조회 1,581
11년 전 조회 4,272
11년 전 조회 2,037
11년 전 조회 1,984
11년 전 조회 5,946
11년 전 조회 1,913
11년 전 조회 2,772
11년 전 조회 2,430
11년 전 조회 1,086
11년 전 조회 3,177
11년 전 조회 2,517
11년 전 조회 5,879
🐛 버그신고