값 넘겨주기 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개
게시판 목록
개발자톡
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1309 |
sogo87
|
11년 전 | 1074 | |
| 1308 | 11년 전 | 950 | ||
| 1307 | 11년 전 | 718 | ||
| 1306 |
presee
|
11년 전 | 646 | |
| 1305 |
sogo87
|
11년 전 | 844 | |
| 1304 | 11년 전 | 929 | ||
| 1303 |
브라이언2
|
11년 전 | 938 | |
| 1302 |
|
11년 전 | 1163 | |
| 1301 |
멋진남자임
|
11년 전 | 1456 | |
| 1300 | 11년 전 | 1367 | ||
| 1299 | 11년 전 | 1609 | ||
| 1298 |
AngryDev
|
11년 전 | 1367 | |
| 1297 |
joe031
|
11년 전 | 1264 | |
| 1296 | 11년 전 | 1509 | ||
| 1295 |
하얀비요일
|
11년 전 | 1038 | |
| 1294 | 11년 전 | 1005 | ||
| 1293 | 11년 전 | 1029 | ||
| 1292 |
|
11년 전 | 1073 | |
| 1291 | 11년 전 | 985 | ||
| 1290 | 11년 전 | 1092 | ||
| 1289 | 11년 전 | 1025 | ||
| 1288 | 11년 전 | 849 | ||
| 1287 |
울라라라우
|
11년 전 | 1444 | |
| 1286 |
skyler
|
11년 전 | 1219 | |
| 1285 |
|
11년 전 | 724 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기