간결함이 무기인데 기본이 없다보니 코드가 엉망입니다.
좀 줄여주세요. ^^
<input type=text name='ct_qty' id='ct_qty' value='1' size=4 maxlength=4 class=ed autocomplete='off' style='text-align:right;' onkeyup='calc_amount()'>
<img src='img/qty_control.gif' border=0 align=absmiddle usemap="#qty_control_map"> 개
<map name="qty_control_map">
<area shape="rect" coords="0, 0, 10, 9" id='qty_plus'>
<area shape="rect" coords="0, 10, 10, 19" id='qty_minus'>
</map>
... 중략 ...
<script>
// 위,아래 이미지 클릭으로 수량 조절
$(document).ready(function() {
var $this = $('#ct_qty');
$('#qty_plus').click(function() {
if (isNaN(parseInt($this.val()))) {
$this.val(1);
}
else {
$this.val(parseInt($this.val()) + 1);
}
}).css('cursor', 'pointer');
$('#qty_minus').click(function() {
if (isNaN(parseInt($this.val()))) {
$this.val(1);
}
else {
$this.val(parseInt($this.val()) - 1);
if ($this.val() < 1) $this.val(1);
}
}).css('cursor', 'pointer');
});
</script>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4074 | |
| 29 |
아우겐나이스
|
21년 전 | 4458 | |
| 28 |
아우겐나이스
|
21년 전 | 3479 | |
| 27 | 21년 전 | 5859 | ||
| 26 | 21년 전 | 3141 | ||
| 25 | 21년 전 | 6106 | ||
| 24 | 18년 전 | 3672 | ||
| 23 | 21년 전 | 3663 | ||
| 22 | 21년 전 | 4262 | ||
| 21 | 21년 전 | 3838 | ||
| 20 | 21년 전 | 4243 | ||
| 19 | 21년 전 | 6705 | ||
| 18 | 21년 전 | 4749 | ||
| 17 | 21년 전 | 7004 | ||
| 16 | 21년 전 | 4187 | ||
| 15 | 21년 전 | 2658 | ||
| 14 | 21년 전 | 4990 | ||
| 13 | 21년 전 | 3416 | ||
| 12 |
Recluse
|
21년 전 | 3900 | |
| 11 |
아우겐나이스
|
21년 전 | 3586 | |
| 10 |
Recluse
|
21년 전 | 3414 | |
| 9 | 21년 전 | 4029 | ||
| 8 | 21년 전 | 5193 | ||
| 7 | 21년 전 | 4781 | ||
| 6 | 21년 전 | 5710 | ||
| 5 | 21년 전 | 4136 | ||
| 4 | 21년 전 | 4866 | ||
| 3 | 21년 전 | 4767 | ||
| 2 | 21년 전 | 3271 | ||
| 1 | 22년 전 | 4357 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기