값 넘겨주기 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년 전 조회 863
11년 전 조회 1,251
11년 전 조회 922
11년 전 조회 511
11년 전 조회 628
11년 전 조회 1,091
11년 전 조회 1,164
11년 전 조회 1,170
11년 전 조회 1,213
11년 전 조회 826
11년 전 조회 913
11년 전 조회 3,694
11년 전 조회 1,529
11년 전 조회 471
11년 전 조회 902
11년 전 조회 741
11년 전 조회 2,125
11년 전 조회 613
11년 전 조회 795
11년 전 조회 494
11년 전 조회 880
11년 전 조회 614
11년 전 조회 922
11년 전 조회 1,618
11년 전 조회 475
11년 전 조회 506
11년 전 조회 1,610
11년 전 조회 1,373
11년 전 조회 1,310
11년 전 조회 700
11년 전 조회 1,414
11년 전 조회 867
11년 전 조회 726
11년 전 조회 900
11년 전 조회 1,010
11년 전 조회 1,097
11년 전 조회 1,043
11년 전 조회 3,767
11년 전 조회 2,708
11년 전 조회 827
11년 전 조회 1,276
11년 전 조회 4,909
11년 전 조회 1,740
11년 전 조회 1,108
11년 전 조회 770
11년 전 조회 1,318
11년 전 조회 1,344
11년 전 조회 1,006
11년 전 조회 523
11년 전 조회 765
11년 전 조회 641
11년 전 조회 926
11년 전 조회 1,347
11년 전 조회 1,367
11년 전 조회 559
11년 전 조회 1,179
11년 전 조회 926
11년 전 조회 683
11년 전 조회 4,809
11년 전 조회 4,383
11년 전 조회 860
11년 전 조회 4,209
11년 전 조회 3,877
11년 전 조회 4,236
11년 전 조회 5,018
11년 전 조회 4,687
11년 전 조회 4,243
11년 전 조회 719
11년 전 조회 5,631
11년 전 조회 1,448
11년 전 조회 938
11년 전 조회 2,948
11년 전 조회 873
11년 전 조회 2,613
11년 전 조회 2,224
11년 전 조회 1,321
11년 전 조회 1,560
11년 전 조회 887
11년 전 조회 2,026
11년 전 조회 808
11년 전 조회 5,312
11년 전 조회 2,173
11년 전 조회 3,288
11년 전 조회 889
11년 전 조회 1,065
11년 전 조회 940
11년 전 조회 1,548
11년 전 조회 865
11년 전 조회 1,509
11년 전 조회 4,194
11년 전 조회 1,956
11년 전 조회 1,910
11년 전 조회 5,870
11년 전 조회 1,838
11년 전 조회 2,703
11년 전 조회 2,348
11년 전 조회 1,011
11년 전 조회 3,104
11년 전 조회 2,447
11년 전 조회 5,804
🐛 버그신고