웹마스터 팁

개발자 디자이너용으로 쓸만한 통합검색링크입니다.
주요 개발관련 사이트 검색을 모아서 처리했습니다.
실제 검색 사용예는 http://www.xhost.co.kr 의 메인에 있습니다.
원래는 .js 파일로 간단하게 처리되는데 설명을 위해 한페이지로 풀었습니다. (좀 기네요..)
.js 방식은 xhost.co.kr 에서  소스보기를 하시거나 쪽지를 남겨주시면 전송해드리겠습니다.

<SCRIPT>
function addplus(items){
    var str = "";
    for (var t = 1 ; t <= items.length ; t++)
    {
       if (items.substring(t-1,t) == " ")
       {  str+="+";  }
       else
       { str+=items.substring(t-1,t); }
    }
    return str;
}

function doSearch(){
    var words;
    words = document.searchforit.query.value;
    var searchitems;
        var site;
    searchitems=addplus(words);
    var index;
        if (document.searchforit.service2.selectedIndex>0) {
                index = document.searchforit.service2.selectedIndex;
                site = document.searchforit.service2.options[index].value;
        }
        else {
                index = document.searchforit.service.selectedIndex;
                site = document.searchforit.service.options[index].value;
        }

        if (navigator.userAgent.indexOf("MSIE")!=-1){
                site+=searchitems;
        }
        else{
                searchitems=escape(searchitems);      
                site+=searchitems;
        }

        if (notEmpty(searchitems)){
                w=window.open(site,'_top_search');
                w.focus();
        }
}



function notEmpty(word) {
    if (word == "" || word == null) {
       self.status="키워드를 입력해 주십시오.";
       alert("n키워드를 입력해 주십시오.");
       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;
}


function ActNow(mmenu){
        url = this.document.GoSW.inURL.value;
        if(url.substring(0,7) != "http://"){
                url = "http://" + url;
        }
        //alert(mmenu);
        if(mmenu == "go"){
                window.open('url','_search');
                //this.document.GoSW.inURL.value = url;
            //top.display.location = url;

        }else if(mmenu == "back"){
                history.back();
        }else if(mmenu == "forward"){
                history.forward();
        }else if(mmenu == "stop"){
                history.back();
        }else if(mmenu == "reload"){
                top.display.location.replace(url);
        }else{
                this.document.GoSW.inURL.value = url;
               top.display.location = mmenu;
        }
        return;
}
</SCRIPT>






<!-- 검색시작 -->
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
        <td valign="top">
        <!-- 가운데 시작-->
                
        <FORM NAME="searchforit" ACTION="javascript:doSearch()" method="GET">
        <table border=0 cellpadding=0 cellspacing=0 width=100%>
        <tr>
        <td nowrap align=center>

        <font size=2 face="굴림">
        <SELECT NAME="service" style="background-color:fff5ef; font-size: 9pt;">
        <OPTION VALUE="http://www.google.co.kr/search?ie=euc-kr&oe=euc-kr&hl=ko&inlang=ko&lr=lang_ko&q="> 구글검색
        <OPTION VALUE="http://images.google.co.kr/images?hl=ko&inlang=ko&ie=EUC-KR&oe=EUC-KR&newwindow=1&lr=lang_ko&q=">G 이미지
        <OPTION VALUE="http://news.google.co.kr/news?hl=ko&inlang=ko&ie=EUC-KR&oe=EUC-KR&newwindow=1&lr=lang_ko&tab=in&q=">G 뉴스
        <OPTION VALUE="http://www.google.co.kr/search?hl=ko&inlang=ko&ie=EUC-KR&oe=EUC-KR&newwindow=1&lr=lang_ko&q=">디렉토리
        <OPTION VALUE="http://simsearch.chol.com/cgi-bin/tot/search.cgi?start=&number=&so=&oq=&oqt=&cat=99&wh=tot&q=">심파일
        <OPTION VALUE="http://search.naver.com/search.naver?where=nexearch&query=">네이버
        <OPTION VALUE="http://search.empas.com/search/all.html?q=">엠파스
        <OPTION VALUE="http://search.dreamwiz.com/cgi-bin/irs.cgi?so=2&q=">드림위즈
        <OPTION VALUE="http://search.daum.net/cgi-bin/nsp/search.cgi?u=host&doc=host&fmt=c&w=tot&q=">다음
        <OPTION VALUE="http://kr.search.yahoo.com/bin/search?h=c&n=20&p=">야후! 코리아
        <OPTION VALUE="http://search.ipop.co.kr/search_jmboard.cgi?whr=1700&key=">자막
        <OPTION VALUE="http://search.yahoo.com/bin/search?n=20&p=">Yahoo!
        <OPTION VALUE="http://www.altavista.com/cgi-bin/query?pg=q&what=web&q=">AltaVista
        <OPTION VALUE="http://www.northernlight.com/nlquery.fcg?ho=&po=&si=&cc=+&us=025&xd=&qr=">Northern Light
        <OPTION VALUE="http://search.excite.com/search.gw?search=">Excite
        <OPTION VALUE="http://www.looksmart.com/r_search?look=&key=">Looksmart
        <OPTION VALUE="http://www.lycos.com/cgi-bin/pursuit?cat=lycos&query=">Lycos
        <OPTION VALUE="http://search.msn.com/results.asp?RS=CHECKED&FORM=MSNH&v=1&q=">MSN
        </SELECT>


        <SELECT NAME="service2" style="background-color:fff5ef; font-size: 9pt;">
        <OPTION VALUE=""> 개발관련
        <OPTION VALUE="http://kr.php.net/search.php?show=quickref&lang=kr&pattern=">PHP 함수
        <OPTION VALUE="http://www.google.co.kr/search?ie=euc-kr&oe=euc-kr&hl=ko&inlang=ko&lr=lang_ko&as_sitesearch=kr.php.net&q=">PHP.net
        <OPTION VALUE="http://www.google.co.kr/search?ie=euc-kr&oe=euc-kr&hl=ko&inlang=ko&lr=lang_ko&as_sitesearch=www.phpschool.com&q=">PHP스쿨
        <OPTION VALUE="http://www.mysql.com/search/?q=">MySQL
        <OPTION VALUE="http://dev.mysql.com/doc/mysql/search.php?version=5.0&from=%2Fdoc%2Frefman%2F5.0%2Fen%2Findex.html&lang=en&q=">MySQL Man.
        <OPTION VALUE="/map/?cmd=searchzip&q=">우편번호검색
        <OPTION VALUE="http://local.naver.com/navermap_browser/?query=">네이버지도
        <OPTION VALUE="http://search.auction.co.kr/search/search.aspx?keyword=">옥션검색
        </SELECT>

        <input type="text" name="query" size=45 maxlength=90 style="font-size: 9pt;"><INPUT TYPE="button" VALUE="검색" style="font-size: 9pt; height:16pt; background-color:e8e8e8;" onClick="doSearch()"></font></td>
        </tr>
        <tr>



        <td align=center  class=main_key>

                <a href="http://www.zdnet.co.kr/news/keywords/" target=_blank>키워드:</a>
                <a href="javascript:showkey('AJAX');">AJAX</a>
                <a href="javascript:showkey('DMB');">DMB</a>
                <a href="http://www.zdnet.co.kr/news/keywords/voip/" target=_blank>voip</a>
                <a href="javascript:showkey('[웹 2.0]');">웹2.0</a>
                <a href="javascript:showkey('매쉬업');">매쉬업</a>
                <a href="javascript:showkey('[파이어폭스 개발]');">파이어폭스</a>
                <a href="javascript:showkey('유비쿼터스 개발');">유비쿼터스</a>
                <a href="javascript:showkey('[윈도우 비스타 롱혼]');">윈도우비스타</a>
                <a href="http://www.zdnet.co.kr/news/keywords/blog/" target=_blank>블로그</a>
        </td>
        </tr>
        </table>
        <script>
        function showkey(keyw) {
                document.searchforit.query.value=keyw;
                doSearch();
        }
        </script>

        </FORM>
<!-- 검색끝 -->