오성급★★★★★
*
  녹색제국

녹색제국을 시작페이지로

    


컴퓨터 태그 홈피만들기 | Posted by 졸당16세 2012. 3. 4. 00:38

검색창 코드

<form name="searchforit" onsubmit="return doSearch()" method="post">
        <script language="javascript">
<!--
function addplus(items)
{
var plussed = "";
for (var t = 1; t<= items.length ; t++)
{
if (items.substring(t-1,t) == " ")
{ plussed+="+"; }
else
{ plussed+=items.substring(t-1,t); }
}
return plussed;
}

// Do the Search
function doSearch()
{
var words;
words = document.searchforit.query.value;
var searchitems;
searchitems=addplus(words);
var index;
// obtain the selectedIndex properties from the search engines option for
index = document.searchforit.service.selectedIndex;
if (index>= 0)
{
var site;
site = document.searchforit.service.options[index].value;
site+=searchitems;


if (notEmpty(searchitems))
{
//window.open("","mainWin");
window.open(site,"_blank");
//window.location=site;
}
}

else
{alert("검색 엔진을 선택하세요.");}
return false;
}

// Check for empty contents in search searchitems
function notEmpty(word)
{
if (word == "" || word == null)
{
self.status="ENTER SEARCH searchitems";
alert("[알림] 검색어를 입력하세요.");
document.searchforit.query.focus();
return false;
}
else
{
self.status = word + "을(를) 찾고 있습니다.";
return true;
}
}

function clearIt()
{
document.searchforit.query.value="";
document.searchforit.query.focus();
}

function FocusOn() {
document.searchforit.query.focus();
return;
}
//-->
</script>
        <table width="600" bgColor="#99cc00">
          <tbody>
            <tr>
              <td align="middle" width="521" bgColor="#99cc00"><span style="FONT-SIZE: 9pt">&nbsp;&nbsp;&nbsp;&nbsp; 
                <select style="FONT-SIZE: 9pt; HEIGHT: 20px; BACKGROUND-COLOR: #ffffff" name="service">
                  <option value="http://search.daum.net/cgi-bin/nsp/search.cgi?w=tot&amp;q=" selected>통합</option>
                  <option value="http://search.naver.com/search.naver?query=">네이버</option>
                  <option value="http://kr.search.yahoo.com/search?fr=kr-front_sb&amp;KEY=&amp;p=">야후</option>
                  <option value="http://esearch.ilikeclick.com/ilikeclick/?ec=20001414&amp;MD=P&amp;TT=%BC%D5%BD%AC%BF%EE+%B0%CB%BB%F6+-+%C0%CC%C1%F6%BC%AD%C4%A1&amp;HK=&amp;AT=Y&amp;PL=10&amp;TP=2&amp;BT=2&amp;query=">이지서치</option>
                  <option value="http://www.google.co.kr/search?hl=ko&amp;q=">구글</option>
                  <option value="http://search.nate.com/search/all.html?s=&amp;q=">NATE</option>
                  <option value="http://search.daum.net/cgi-bin/nsp/search.cgi?w=tot&amp;q=">다음</option>
                  <option value="http://search.paran.com/search/index.php?Query=">파란</option>
                </select> </span><input style="BORDER-RIGHT: #669c14 2px solid; BORDER-TOP: #669c14 2px solid; PADDING-LEFT: 6px; FONT-SIZE: 12px; IME-MODE: active; BORDER-LEFT: #669c14 2px solid; WIDTH: 400px; COLOR: #000000; PADDING-TOP: 8px; BORDER-BOTTOM: #669c14 2px solid; POSITION: relative; HEIGHT: 20px; BACKGROUND-COLOR: #ffffff" size="42" name="query"></td>
              <td width="68" bgColor="#99cc00">
                <p align="center"><a onclick="javascript:doSearch()" href="#"><img height="40" src="http://cfs.tistory.com/custom/blog/50/509291/skin/images/kemsak.gif?=20538049750.6227836849439449" width="65" align="absMiddle" border="0"></a></p>
              </td>
              </FORM>
            </tr>
          </tbody>
        </table>
종합멀티검색창 소스입니다 5대포털 검색결과를 한번입력으로 다 불러 올 수 있는 편리성을 자랑합니다.

'컴퓨터 태그 홈피만들기' 카테고리의 다른 글

후레시 배경에 글쓰기  (0) 2012.03.04
티스토리 초대장을 나누어 드리면서  (1) 2012.03.02
돈버는 블로거  (1) 2012.02.18
시작페이지 만들기  (0) 2012.02.04
티스토리 스킨 쉬운 편집  (0) 2012.01.28