그누보드 [G4] 전체검색창 삽입하기
페이지 정보
본문
<!-- 검색 시작 -->
<table border="0" cellspacing="0" cellpadding="0" style="margin:20 0 0 2;">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content||wr_1||wr_2||wr_3||wr_4||wr_5||wr_6||wr_7||wr_8||wr_9||wr_10">
<input type="hidden" name="sop" value="and">
<input type="hidden" name="happyjung" value="search"><? //검색후 변수확보 ?>
<tr>
<td valign="bottom"><img src="/2008/images/search_left.jpg" width="89" height="21"></td>
<td width="5"> </td>
<td> </td>
</tr>
<tr>
<td><input type="text" name="stx" style="border:solid 1px #BEDFFA; width:133px; height:20px;"></td>
<td width="5"> </td>
<td><input type="image" src="/2008/images/search_btn.jpg" border="0"></td>
</tr>
</form>
</table>
<script language="JavaScript">
<!--
function fsearchbox_submit(f) {
if (f.stx.value == '') {
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
//-->
</script>
참고자료
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=359
<table border="0" cellspacing="0" cellpadding="0" style="margin:20 0 0 2;">
<form name="fsearchbox" method="get" action="javascript:fsearchbox_submit(document.fsearchbox);">
<!-- <input type="hidden" name="sfl" value="concat(wr_subject,wr_content)"> -->
<input type="hidden" name="sfl" value="wr_subject||wr_content||wr_1||wr_2||wr_3||wr_4||wr_5||wr_6||wr_7||wr_8||wr_9||wr_10">
<input type="hidden" name="sop" value="and">
<input type="hidden" name="happyjung" value="search"><? //검색후 변수확보 ?>
<tr>
<td valign="bottom"><img src="/2008/images/search_left.jpg" width="89" height="21"></td>
<td width="5"> </td>
<td> </td>
</tr>
<tr>
<td><input type="text" name="stx" style="border:solid 1px #BEDFFA; width:133px; height:20px;"></td>
<td width="5"> </td>
<td><input type="image" src="/2008/images/search_btn.jpg" border="0"></td>
</tr>
</form>
</table>
<script language="JavaScript">
<!--
function fsearchbox_submit(f) {
if (f.stx.value == '') {
alert("검색어를 입력하세요.");
f.stx.select();
f.stx.focus();
return;
}
/*
// 검색에 많은 부하가 걸리는 경우 이 주석을 제거하세요.
var cnt = 0;
for (var i=0; i<f.stx.value.length; i++)
{
if (f.stx.value.charAt(i) == ' ')
cnt++;
}
if (cnt > 1) {
alert("빠른 검색을 위하여 검색어에 공백은 한개만 입력할 수 있습니다.");
f.stx.select();
f.stx.focus();
return;
}
*/
f.action = "<?=$g4['bbs_path']?>/search.php";
f.submit();
}
//-->
</script>
참고자료
http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=359
댓글목록
등록된 댓글이 없습니다.