값 넘겨주기 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년 전 조회 900
11년 전 조회 1,292
11년 전 조회 961
11년 전 조회 554
11년 전 조회 665
11년 전 조회 1,129
11년 전 조회 1,203
11년 전 조회 1,207
11년 전 조회 1,256
11년 전 조회 863
11년 전 조회 950
11년 전 조회 3,738
11년 전 조회 1,567
11년 전 조회 509
11년 전 조회 938
11년 전 조회 776
11년 전 조회 2,149
11년 전 조회 650
11년 전 조회 831
11년 전 조회 531
11년 전 조회 916
11년 전 조회 651
11년 전 조회 959
11년 전 조회 1,656
11년 전 조회 513
11년 전 조회 543
11년 전 조회 1,650
11년 전 조회 1,411
11년 전 조회 1,344
11년 전 조회 735
11년 전 조회 1,448
11년 전 조회 909
11년 전 조회 759
11년 전 조회 936
11년 전 조회 1,040
11년 전 조회 1,129
11년 전 조회 1,075
11년 전 조회 3,793
11년 전 조회 2,741
11년 전 조회 861
11년 전 조회 1,312
11년 전 조회 4,933
11년 전 조회 1,772
11년 전 조회 1,142
11년 전 조회 802
11년 전 조회 1,351
11년 전 조회 1,375
11년 전 조회 1,038
11년 전 조회 559
11년 전 조회 798
11년 전 조회 674
11년 전 조회 960
11년 전 조회 1,382
11년 전 조회 1,391
11년 전 조회 590
11년 전 조회 1,212
11년 전 조회 959
11년 전 조회 702
11년 전 조회 4,838
11년 전 조회 4,409
11년 전 조회 895
11년 전 조회 4,229
11년 전 조회 3,887
11년 전 조회 4,251
11년 전 조회 5,046
11년 전 조회 4,717
11년 전 조회 4,266
11년 전 조회 750
11년 전 조회 5,659
11년 전 조회 1,472
11년 전 조회 971
11년 전 조회 2,969
11년 전 조회 901
11년 전 조회 2,629
11년 전 조회 2,245
11년 전 조회 1,348
11년 전 조회 1,591
11년 전 조회 913
11년 전 조회 2,052
11년 전 조회 833
11년 전 조회 5,337
11년 전 조회 2,198
11년 전 조회 3,309
11년 전 조회 910
11년 전 조회 1,095
11년 전 조회 963
11년 전 조회 1,574
11년 전 조회 892
11년 전 조회 1,538
11년 전 조회 4,216
11년 전 조회 1,984
11년 전 조회 1,934
11년 전 조회 5,895
11년 전 조회 1,866
11년 전 조회 2,720
11년 전 조회 2,376
11년 전 조회 1,033
11년 전 조회 3,122
11년 전 조회 2,470
11년 전 조회 5,825
🐛 버그신고