값 넘겨주기 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년 전 조회 864
11년 전 조회 1,255
11년 전 조회 924
11년 전 조회 514
11년 전 조회 631
11년 전 조회 1,093
11년 전 조회 1,166
11년 전 조회 1,172
11년 전 조회 1,216
11년 전 조회 829
11년 전 조회 915
11년 전 조회 3,698
11년 전 조회 1,531
11년 전 조회 473
11년 전 조회 904
11년 전 조회 743
11년 전 조회 2,129
11년 전 조회 616
11년 전 조회 798
11년 전 조회 496
11년 전 조회 882
11년 전 조회 618
11년 전 조회 927
11년 전 조회 1,622
11년 전 조회 477
11년 전 조회 507
11년 전 조회 1,615
11년 전 조회 1,379
11년 전 조회 1,313
11년 전 조회 701
11년 전 조회 1,417
11년 전 조회 869
11년 전 조회 730
11년 전 조회 903
11년 전 조회 1,014
11년 전 조회 1,099
11년 전 조회 1,047
11년 전 조회 3,770
11년 전 조회 2,711
11년 전 조회 833
11년 전 조회 1,279
11년 전 조회 4,911
11년 전 조회 1,745
11년 전 조회 1,111
11년 전 조회 774
11년 전 조회 1,319
11년 전 조회 1,346
11년 전 조회 1,012
11년 전 조회 527
11년 전 조회 767
11년 전 조회 645
11년 전 조회 927
11년 전 조회 1,350
11년 전 조회 1,369
11년 전 조회 561
11년 전 조회 1,180
11년 전 조회 929
11년 전 조회 686
11년 전 조회 4,811
11년 전 조회 4,383
11년 전 조회 865
11년 전 조회 4,210
11년 전 조회 3,878
11년 전 조회 4,237
11년 전 조회 5,021
11년 전 조회 4,688
11년 전 조회 4,245
11년 전 조회 721
11년 전 조회 5,633
11년 전 조회 1,451
11년 전 조회 941
11년 전 조회 2,949
11년 전 조회 874
11년 전 조회 2,615
11년 전 조회 2,224
11년 전 조회 1,322
11년 전 조회 1,565
11년 전 조회 889
11년 전 조회 2,026
11년 전 조회 808
11년 전 조회 5,313
11년 전 조회 2,176
11년 전 조회 3,289
11년 전 조회 892
11년 전 조회 1,068
11년 전 조회 941
11년 전 조회 1,551
11년 전 조회 868
11년 전 조회 1,509
11년 전 조회 4,196
11년 전 조회 1,960
11년 전 조회 1,914
11년 전 조회 5,874
11년 전 조회 1,844
11년 전 조회 2,705
11년 전 조회 2,349
11년 전 조회 1,013
11년 전 조회 3,105
11년 전 조회 2,448
11년 전 조회 5,807
🐛 버그신고