답변 2개
채택된 답변
+20 포인트
8년 전
itemname='시작일' onKeyUp="number_format(this)" value='=$t_start?>'> 만원
~
itemname='마지막일' onKeyUp="number_format(this)" value='=$t_end?>'> 만원
$("#price_junse").on("change", function() {
var arr = this.value.split("~");
$("#t_start").val(arr[0]).attr("readonly",true);
$("#t_end").val(arr[1]).attr("readonly",true);
})
로그인 후 평가할 수 있습니다
답변에 대한 댓글 4개
�
마조
8년 전
�
슈와이
8년 전
<tr>
<td width="60" height="20" align="right">보증금 :</td>
<td align="left">
<input class='ed' type=text id=t_start name='t_start' size=8 maxlength=8 minlength=3
itemname='시작일' onKeyUp="number_format(this)" value='<?=$t_start?>'> 만원
~ <input class='ed' type=text id=t_end name='t_end' size=8 maxlength=8 minlength=3
itemname='마지막일' onKeyUp="number_format(this)" value='<?=$t_end?>'> 만원
</td>
<td><select name='price_junse' style='font-size:;' id="price_junse">
<option value='' selected style='background-color:'>가격선택</option>
<option value='100~500'>100만원~500만원</option><option value='500~1,000'>500만원~1,000만원</option><option value='1,000~2,000'>1,00만원~2,000만원</option><option value='2,000~3,000'>2,000만원~3,000만원</option></select></td>
</tr>
<script>
$("#price_junse").on("change", function() {
if (this.value) {
var arr = this.value.split("~");
$("#t_start").val(arr[0]).attr("readonly", true);
$("#t_end").val(arr[1]).attr("readonly", true);
} else {
$("#t_start").val("").attr("readonly", false);
$("#t_end").val("").attr("readonly", false);
}
})
</script>
<td width="60" height="20" align="right">보증금 :</td>
<td align="left">
<input class='ed' type=text id=t_start name='t_start' size=8 maxlength=8 minlength=3
itemname='시작일' onKeyUp="number_format(this)" value='<?=$t_start?>'> 만원
~ <input class='ed' type=text id=t_end name='t_end' size=8 maxlength=8 minlength=3
itemname='마지막일' onKeyUp="number_format(this)" value='<?=$t_end?>'> 만원
</td>
<td><select name='price_junse' style='font-size:;' id="price_junse">
<option value='' selected style='background-color:'>가격선택</option>
<option value='100~500'>100만원~500만원</option><option value='500~1,000'>500만원~1,000만원</option><option value='1,000~2,000'>1,00만원~2,000만원</option><option value='2,000~3,000'>2,000만원~3,000만원</option></select></td>
</tr>
<script>
$("#price_junse").on("change", function() {
if (this.value) {
var arr = this.value.split("~");
$("#t_start").val(arr[0]).attr("readonly", true);
$("#t_end").val(arr[1]).attr("readonly", true);
} else {
$("#t_start").val("").attr("readonly", false);
$("#t_end").val("").attr("readonly", false);
}
})
</script>
�
슈와이
8년 전
http://shuai0.dothome.co.kr/demo/comma.html
�
마조
8년 전
다시 올려주신 스크립트도 input 으로 값을 넘겨주지 못하는것 같습니다.
다른분의 도움으로 replace(/\D/g,''); 를 제거해서 콤마도 넘어가게 되었습니다.
부족한 질문에도 이렇게 신경써 답변주셔서 감사드려요.
다른분의 도움으로 replace(/\D/g,''); 를 제거해서 콤마도 넘어가게 되었습니다.
부족한 질문에도 이렇게 신경써 답변주셔서 감사드려요.
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인
선택한 금액이 input로 넘어가지를 않는것 같습니다.