JQUERY SELECT에서 선택하자 마자 바로 액션발생시 처리하는 루틴
=============================JS=========================
$(document).ready(function(){
$('#page_limit').val('<?php echo $page_limit; ?>');
$('#search_text').val('<?php echo $search_text; ?>');
$('#search_type2').val('<?php echo $search_type2; ?>');
$("#page_limit").change(function(){
$("form[name=page_form] input[name=page_limit]").val($(this).val());
//alert($("form[name=page_form] input[name=page_limit]").val());
gopage('0');
});
$("#search_type2").change(function(){
$("form[name=page_form] input[name=search_type2]").val($(this).val());
//alert($("form[name=page_form] input[name=page_limit]").val());
gopage('0');
});
});
function gopage(page_idx){
//alert(page_idx);
document.page_form.page.value=page_idx;
document.page_form.submit();
}
=============================HTML=========================
<form name="page_form" method="POST">
<input type='hidden' name="search_text" value="<?=$search_text?>">
<input type='hidden' name="search_type2" value="<?=$search_type2?>">
<input type='hidden' name="page_limit" value="<?=$page_limit?>">
<input type='hidden' name="page" value="<?=$page?>">
</form>
<td bgcolor="#FFFFFF" class="in_th th_color">한페이지당목록수</td>
<td>
<select id='page_limit' name='page_limit' style='width: 80px'>
<option value='10' selected>10</option>
<option value='30'>30</option>
<option value='50'>50</option>
</select>
</td>
<td class="in_th th_color">담보비율</td>
<td>
<select name='search_type2' id='search_type2' style='width: 120px'>
<option value='1' selected>전체</option>
<option value='2'>130%이상</option>
<option value='3'>130%이하</option>
</select>
</td>
'프론트엔드 > 그래픽디자인_퍼블리싱' 카테고리의 다른 글
웹 표준 퍼블리싱 바이블 책 정리(1) (0) | 2018.06.04 |
---|---|
앱)CSS 상속되는 속성들 정리 (0) | 2017.11.29 |
html에서 특수기호 (0) | 2017.05.21 |
자바스크립트에서 <style>에 CSS 구문 넣어줄때 예제 (0) | 2017.05.02 |
photoshop 관련 정리 (0) | 2017.01.22 |