값 넘겨주기 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년 전 조회 951
11년 전 조회 1,337
11년 전 조회 1,006
11년 전 조회 605
11년 전 조회 718
11년 전 조회 1,175
11년 전 조회 1,255
11년 전 조회 1,256
11년 전 조회 1,303
11년 전 조회 917
11년 전 조회 998
11년 전 조회 3,781
11년 전 조회 1,609
11년 전 조회 557
11년 전 조회 982
11년 전 조회 829
11년 전 조회 2,203
11년 전 조회 700
11년 전 조회 880
11년 전 조회 577
11년 전 조회 962
11년 전 조회 705
11년 전 조회 1,008
11년 전 조회 1,700
11년 전 조회 565
11년 전 조회 586
11년 전 조회 1,702
11년 전 조회 1,460
11년 전 조회 1,392
11년 전 조회 783
11년 전 조회 1,496
11년 전 조회 954
11년 전 조회 805
11년 전 조회 980
11년 전 조회 1,087
11년 전 조회 1,177
11년 전 조회 1,121
11년 전 조회 3,845
11년 전 조회 2,778
11년 전 조회 902
11년 전 조회 1,361
11년 전 조회 4,981
11년 전 조회 1,814
11년 전 조회 1,190
11년 전 조회 844
11년 전 조회 1,392
11년 전 조회 1,419
11년 전 조회 1,087
11년 전 조회 609
11년 전 조회 840
11년 전 조회 713
11년 전 조회 1,002
11년 전 조회 1,424
11년 전 조회 1,430
11년 전 조회 632
11년 전 조회 1,262
11년 전 조회 1,004
11년 전 조회 746
11년 전 조회 4,886
11년 전 조회 4,461
11년 전 조회 942
11년 전 조회 4,267
11년 전 조회 3,915
11년 전 조회 4,280
11년 전 조회 5,095
11년 전 조회 4,767
11년 전 조회 4,317
11년 전 조회 794
11년 전 조회 5,704
11년 전 조회 1,518
11년 전 조회 1,011
11년 전 조회 3,009
11년 전 조회 944
11년 전 조회 2,668
11년 전 조회 2,287
11년 전 조회 1,392
11년 전 조회 1,633
11년 전 조회 951
11년 전 조회 2,106
11년 전 조회 879
11년 전 조회 5,378
11년 전 조회 2,240
11년 전 조회 3,349
11년 전 조회 957
11년 전 조회 1,135
11년 전 조회 1,004
11년 전 조회 1,607
11년 전 조회 929
11년 전 조회 1,573
11년 전 조회 4,258
11년 전 조회 2,024
11년 전 조회 1,973
11년 전 조회 5,934
11년 전 조회 1,902
11년 전 조회 2,757
11년 전 조회 2,412
11년 전 조회 1,066
11년 전 조회 3,164
11년 전 조회 2,502
11년 전 조회 5,868
🐛 버그신고