값 넘겨주기 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개
게시판 목록
개발자톡
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1384 |
|
10년 전 | 552 | |
| 1383 |
|
10년 전 | 657 | |
| 1382 | 10년 전 | 1149 | ||
| 1381 | 10년 전 | 1212 | ||
| 1380 |
|
10년 전 | 1223 | |
| 1379 | 10년 전 | 1319 | ||
| 1378 |
진짜별사탕
|
10년 전 | 866 | |
| 1377 | 10년 전 | 948 | ||
| 1376 | 10년 전 | 3715 | ||
| 1375 |
멋진남자임
|
10년 전 | 502 | |
| 1374 | 10년 전 | 939 | ||
| 1373 | 10년 전 | 770 | ||
| 1372 | 10년 전 | 634 | ||
| 1371 | 10년 전 | 820 | ||
| 1370 |
중국어사이트제작
|
10년 전 | 504 | |
| 1369 | 10년 전 | 907 | ||
| 1368 | 10년 전 | 636 | ||
| 1367 |
울라라라우
|
10년 전 | 940 | |
| 1366 |
멋진남자임
|
10년 전 | 496 | |
| 1365 | 10년 전 | 529 | ||
| 1364 |
senseme
|
10년 전 | 1438 | |
| 1363 | 10년 전 | 1364 | ||
| 1362 | 10년 전 | 746 | ||
| 1361 | 10년 전 | 896 | ||
| 1360 |
|
10년 전 | 775 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기