태터데스크 관리자

도움말
닫기
적용하기   첫페이지 만들기

태터데스크 메시지

저장하였습니다.


<html>
<head>
<script language='javascript'>
function searchText() {

    var upquery =  document.getElementById('searchText').value;
    var dimSite = document.getElementById('site').options[document.getElementById('site').selectedIndex].value;

    queryUrl = new Array(18);
    queryUrl[0] = new Array("search.hajai.com/m_searchs.html?pos=mata&p=",2);
    queryUrl[1] = new Array("search.empas.com/search/all.html?col=WW&sv=IS&lk=noframes&nh=10&q=",2);
    queryUrl[2] = new Array("kr.search.yahoo.com/bin/search?p=","1");
    queryUrl[3] = new Array("search.naver.com/search.naver?nfid=junheego&where=nexearch&query=",1);
    queryUrl[4] = new Array("search.daum.net/cgi-bin/nsp/search.cgi?nil_profile=g&nil_Search=btn&sw=tot&q=",2);
    queryUrl[5] = new Array("www.lycos.co.kr/lsa/search?w=blog&q=",2);
    queryUrl[6] = new Array("kr.altavista.com/web/results?itag=ody&q=",1);
    queryUrl[7] = new Array("www.google.co.kr/search?hl=ko&q=",1);
    queryUrl[8] = new Array("search.chol.com/cgi-bin/search.cgi?h=chol&q=",2);
    queryUrl[9] = new Array("dic.naver.com/endic?where=dic&query=",2);
    queryUrl[10] = new Array("kr.imagesearch.yahoo.com/search/image?p=",1);
    queryUrl[11] = new Array("search.hajai.com/m_searchs_news.html?pos=mata&p=",2);
    queryUrl[12] = new Array("krdic.naver.com/search.nhn?dic_where=krdic&kind=&query=",1);
    queryUrl[13] = new Array("music.search.naver.com/search.naver?where=music&sm=tab_jum&query=",1);
    queryUrl[14] = new Array("kr.search.encycl.yahoo.com/search/enc?jy=ency&p=",1);
    queryUrl[15] = new Array("maps.naver.com/?query=",2);
    queryUrl[16] = new Array("simsearch.chol.com/search/search.php?start=&number=&so=&oq=&oqt=&cat=99&wh=tot&q=",2);
    queryUrl[17] = new Array("local.paran.com/tel/tel_simple_main.php?doname=&gugun=&dong=&COL=%2Ftel%2Ftel_simple_main.php&Query=",2);


    siteName = new Array(18);
    siteName[0] = "1";
    siteName[1] = "2";
    siteName[2] = "3";
    siteName[3] = "4";
    siteName[4] = "5";
    siteName[5] = "6";
    siteName[6] = "7";
    siteName[7] = "8";
    siteName[8] = "9";
    siteName[9] = "10";
    siteName[10] = "11";
    siteName[11] = "12";
    siteName[12] = "13";
    siteName[13] = "14";
    siteName[14] = "15";
    siteName[15] = "16";
    siteName[16] = "17";
    siteName[17] = "18";


    for(var i=0; i < 18; i++) {
           
            if(siteName[i] == dimSite) {

                    if(document.getElementById('winopen').checked) {

                            var dimQuery = (queryUrl[i][1] == 1) ? encodeURIComponent(upquery) : upquery;

                            var newWin = window.open('http://' + queryUrl[i][0] + dimQuery ,'_blank');
                            break;
                   
                    } else {

                            var dimQuery = (queryUrl[i][1] == 1) ? encodeURIComponent(upquery) : upquery;

                            location.href = 'http://' + queryUrl[i][0] + dimQuery;
                            break;
                           
                    }

            }

    }

}
</script>
</head>
<body>
<select id='site'>
<option value="1">하자아이</option>
<option value="2">엠파스</option>
<option value="3">야후</option>
<option value="4" selected>네이버</option>
<option value="5">다음</option>
<option value="6">라이코스</option>
<option value="7">알타비스타</option>
<option value="8">구글</option>
<option value="9">천리안</option>
<option value="10">영어사전</option>
<option value="11">이미지</option>
<option value="12">뉴스</option>
<option value="13">국어사전</option>
<option value="14">음악</option>
<option value="15">백과사전</option>
<option value="16">지도</option>
<option value="17">파일검색</option>
<option value="18">전화번호</option>
</select>  

<input type='text' size='26' id='searchText' onkeypress="if(escape(event.keyCode) == 13) { searchText(); }">
<input type='button' value='검색' onclick='searchText();'>
<input type='checkbox' id='winopen'>
새창

</body>
</html>

신고
Posted by 고시랑

티스토리 툴바