값 넘겨주기 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년 전 조회 1,012
11년 전 조회 1,397
11년 전 조회 1,059
11년 전 조회 664
11년 전 조회 767
11년 전 조회 1,225
11년 전 조회 1,313
11년 전 조회 1,315
11년 전 조회 1,359
11년 전 조회 966
11년 전 조회 1,050
11년 전 조회 3,840
11년 전 조회 1,665
11년 전 조회 613
11년 전 조회 1,036
11년 전 조회 881
11년 전 조회 2,257
11년 전 조회 764
11년 전 조회 937
11년 전 조회 631
11년 전 조회 1,020
11년 전 조회 764
11년 전 조회 1,070
11년 전 조회 1,760
11년 전 조회 618
11년 전 조회 636
11년 전 조회 1,759
11년 전 조회 1,511
11년 전 조회 1,446
11년 전 조회 840
11년 전 조회 1,552
11년 전 조회 1,014
11년 전 조회 868
11년 전 조회 1,042
11년 전 조회 1,153
11년 전 조회 1,225
11년 전 조회 1,184
11년 전 조회 3,910
11년 전 조회 2,842
11년 전 조회 965
11년 전 조회 1,417
11년 전 조회 5,047
11년 전 조회 1,873
11년 전 조회 1,246
11년 전 조회 910
11년 전 조회 1,464
11년 전 조회 1,480
11년 전 조회 1,144
11년 전 조회 668
11년 전 조회 894
11년 전 조회 784
11년 전 조회 1,068
11년 전 조회 1,497
11년 전 조회 1,496
11년 전 조회 696
11년 전 조회 1,327
11년 전 조회 1,064
11년 전 조회 806
11년 전 조회 4,941
11년 전 조회 4,523
11년 전 조회 1,000
11년 전 조회 4,324
11년 전 조회 3,963
11년 전 조회 4,349
11년 전 조회 5,155
11년 전 조회 4,825
11년 전 조회 4,382
11년 전 조회 865
11년 전 조회 5,765
11년 전 조회 1,585
11년 전 조회 1,072
11년 전 조회 3,074
11년 전 조회 1,012
11년 전 조회 2,735
11년 전 조회 2,362
11년 전 조회 1,457
11년 전 조회 1,696
11년 전 조회 1,018
11년 전 조회 2,162
11년 전 조회 936
11년 전 조회 5,447
11년 전 조회 2,306
11년 전 조회 3,417
11년 전 조회 1,014
11년 전 조회 1,200
11년 전 조회 1,074
11년 전 조회 1,675
11년 전 조회 993
11년 전 조회 1,626
11년 전 조회 4,338
11년 전 조회 2,092
11년 전 조회 2,036
11년 전 조회 6,004
11년 전 조회 1,971
11년 전 조회 2,834
11년 전 조회 2,484
11년 전 조회 1,147
11년 전 조회 3,235
11년 전 조회 2,573
11년 전 조회 5,944
🐛 버그신고