development♥

% 랑 cif 차이

리니❤ 2022. 11. 8. 09:45
반응형

% 랑 cif 차이

 

 

 

 

jstl = <c:if

 

 


<div class="row">
<div class="col-lg-2 h">검색</div>
<div class="col-lg-10 d">
<div class="form-inline">
<select id="search_list_st" name="sch_type" class="form-control form-control-sm mr-1">
<option value="" <c:if test="${requestScope.param.sch_type == ''}">selected="selected"</c:if> >전체</option>
<option value="sj" <c:if test="${requestScope.param.sch_type == 'sj'}">selected="selected"</c:if> >제목</option>
<option value="cn" <c:if test="${requestScope.param.sch_type == 'cn'}">selected="selected"</c:if> >내용</option>
</select>
<input class="form-control form-control-sm mr-1" style="ime-mode:active;" type="text" name="sch_text" placeholder="검색어를 입력하세요." value="${requestScope.param.sch_text}">
<button class="btn btn-sm btn-default btn-outline-dark form-control-sm" type="button" onclick="fnSearch(); return false;"><i class="fa fa-search"></i></button>
</div>
</div>
</div>

 

 

 

 

 

 

jsp = <% 



자바를 사용할때 

<tr>
<td class="text-left" bgcolor="#F2F5F8" style="font-weight: bold;" >전송가부</td>
<td> 
<div class="text-left form-inline">
<div class="form-group">
<select id="sch_trnsmis_yn" name="sch_trnsmis_yn" class="form-control input-sm">
<option value="banner_nm" <%if(param.getString("sch_type").equals("banner_nm")){%>selected="selected"<%}%>>전체</option>
<option value="attrb_1" <%if(param.getString("sch_type").equals("attrb_1")){%>selected="selected"<%}%>>예</option>
<option value="attrb_2" <%if(param.getString("sch_type").equals("attrb_2")){%>selected="selected"<%}%>>아니오</option>
</select>
</div>
</div>
</td>
</tr>

반응형