값 넘겨주기 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년 전 조회 867
11년 전 조회 1,257
11년 전 조회 924
11년 전 조회 518
11년 전 조회 632
11년 전 조회 1,094
11년 전 조회 1,168
11년 전 조회 1,175
11년 전 조회 1,217
11년 전 조회 830
11년 전 조회 918
11년 전 조회 3,698
11년 전 조회 1,531
11년 전 조회 476
11년 전 조회 906
11년 전 조회 743
11년 전 조회 2,129
11년 전 조회 616
11년 전 조회 800
11년 전 조회 498
11년 전 조회 882
11년 전 조회 619
11년 전 조회 928
11년 전 조회 1,622
11년 전 조회 480
11년 전 조회 508
11년 전 조회 1,617
11년 전 조회 1,380
11년 전 조회 1,315
11년 전 조회 701
11년 전 조회 1,417
11년 전 조회 873
11년 전 조회 730
11년 전 조회 906
11년 전 조회 1,016
11년 전 조회 1,101
11년 전 조회 1,048
11년 전 조회 3,770
11년 전 조회 2,712
11년 전 조회 833
11년 전 조회 1,280
11년 전 조회 4,913
11년 전 조회 1,745
11년 전 조회 1,112
11년 전 조회 774
11년 전 조회 1,319
11년 전 조회 1,346
11년 전 조회 1,012
11년 전 조회 532
11년 전 조회 769
11년 전 조회 647
11년 전 조회 931
11년 전 조회 1,353
11년 전 조회 1,369
11년 전 조회 564
11년 전 조회 1,182
11년 전 조회 930
11년 전 조회 686
11년 전 조회 4,813
11년 전 조회 4,387
11년 전 조회 866
11년 전 조회 4,211
11년 전 조회 3,879
11년 전 조회 4,239
11년 전 조회 5,023
11년 전 조회 4,690
11년 전 조회 4,247
11년 전 조회 724
11년 전 조회 5,635
11년 전 조회 1,455
11년 전 조회 944
11년 전 조회 2,951
11년 전 조회 874
11년 전 조회 2,616
11년 전 조회 2,226
11년 전 조회 1,325
11년 전 조회 1,566
11년 전 조회 891
11년 전 조회 2,028
11년 전 조회 808
11년 전 조회 5,314
11년 전 조회 2,178
11년 전 조회 3,289
11년 전 조회 894
11년 전 조회 1,072
11년 전 조회 942
11년 전 조회 1,553
11년 전 조회 870
11년 전 조회 1,512
11년 전 조회 4,198
11년 전 조회 1,962
11년 전 조회 1,914
11년 전 조회 5,875
11년 전 조회 1,845
11년 전 조회 2,705
11년 전 조회 2,350
11년 전 조회 1,014
11년 전 조회 3,105
11년 전 조회 2,450
11년 전 조회 5,808
🐛 버그신고