검색엔진을 구글로 하고 싶습니다. 정보
검색엔진을 구글로 하고 싶습니다.본문
댓글 전체
구글 가셔서 account 만드시고 http://www.google.co.kr/cse/
자스 한줄 넣으면 끝이라서 설명드릴 것도 없는데....
혹시 two page setup 을 원하시나요?
그부분도 어렵지 않습니다. 영어로는 구글 CSE 페이지에 다 설명이 되어 있으니까 아마 한국어로도 설명이 되어 있을거에요. 읽어보시고 설명에 나오는데로 똑같이 따라만 하시면 됩니다.
자스 한줄 넣으면 끝이라서 설명드릴 것도 없는데....
혹시 two page setup 을 원하시나요?
그부분도 어렵지 않습니다. 영어로는 구글 CSE 페이지에 다 설명이 되어 있으니까 아마 한국어로도 설명이 되어 있을거에요. 읽어보시고 설명에 나오는데로 똑같이 따라만 하시면 됩니다.
만약 설명서를 읽어도 모르시겠으면
<div id='search'>
<form name='fsearchbox' method='get' onsubmit='return fsearchbox_submit(this);'>
<fieldset>
<legend>SIR 전체검색</legend>
<label for='search_q'>검색</label>
<input type='text' id='search_q' name='q' class='search_box' value='' />
<!-- <input type='image' id='search_submit' src='../img/12xmas/btn_search.png' alt='검색' /> -->
<input type='image' id='search_submit' src='../img/btn_search.png' alt='검색' />
</fieldset>
</form>
</div>
<script>
function fsearchbox_submit(f) {
if (f.q.value.length < 1) {
alert("검색어를 입력해 주십시오.");
f.q.focus();
return false;
}
f.action = "../bbs/search.php";
return true;
}
</script>
모르시겠으면 이 위 소스 코드를 ctrl+c, v 해서 넣으시고 테스트 해보세요.
검색 결과가 표시되어야 할 페이지에는 아래 코드를 넣으시구요.
<div id='google_search_result'>
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '006496352859622539649:3-i2hxripea';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only><div id='google_search_result_loading'><img src='../img/loadinfo.net.gif' /></div></gcse:searchresults-only>
</div>
<div id='search'>
<form name='fsearchbox' method='get' onsubmit='return fsearchbox_submit(this);'>
<fieldset>
<legend>SIR 전체검색</legend>
<label for='search_q'>검색</label>
<input type='text' id='search_q' name='q' class='search_box' value='' />
<!-- <input type='image' id='search_submit' src='../img/12xmas/btn_search.png' alt='검색' /> -->
<input type='image' id='search_submit' src='../img/btn_search.png' alt='검색' />
</fieldset>
</form>
</div>
<script>
function fsearchbox_submit(f) {
if (f.q.value.length < 1) {
alert("검색어를 입력해 주십시오.");
f.q.focus();
return false;
}
f.action = "../bbs/search.php";
return true;
}
</script>
모르시겠으면 이 위 소스 코드를 ctrl+c, v 해서 넣으시고 테스트 해보세요.
검색 결과가 표시되어야 할 페이지에는 아래 코드를 넣으시구요.
<div id='google_search_result'>
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '006496352859622539649:3-i2hxripea';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only><div id='google_search_result_loading'><img src='../img/loadinfo.net.gif' /></div></gcse:searchresults-only>
</div>
댓글보고 배워갑니다. 너무너무 감사합니다.
감사합니다.
감사합니다.