»
Tiếng AnhTiếng PhápTiếng Việt

In - Hộp tìm kiếm - JavaScriptBank.com

Phiên bản đầy đủ: jsB@nk » Ứng dụng » Tìm kiếm » Hộp tìm kiếm
URL: https://www.javascriptbank.com/search-box-script.html

Hộp tìm kiếm © JavaScriptBank.comHiệu ứng tạo một hộp tìm kiếm với một vài công cụ tìm kiếm nổi tiếng.

Phiên bản đầy đủ: jsB@nk » Ứng dụng » Tìm kiếm » Hộp tìm kiếm
URL: https://www.javascriptbank.com/search-box-script.html



JavaScript
<SCRIPT LANGUAGE="JavaScript"><!-- Begin// by [email protected] searchFunc() {var newWindow = window.open("about:blank", "searchValue", "width=200, height=200, resizable=no, maximizable=no");var searchValue = document.search.queryField.value;var yahooSearch = document.search.yahoo.value;var altavistaSearch = document.search.altavista.value;var webcrawlerSearch = document.search.webcrawler.value;var exciteSearch = document.search.excite.value;newWindow.document.write("<html>\n<head>\n<title>Select Seach Engine</title>\n</head>");newWindow.document.write("<body>\n");newWindow.document.write("<a href='" + yahooSearch + searchValue + "' target = 'main'>Yahoo!</a><br><br>\n");newWindow.document.write("<a href='" + altavistaSearch + searchValue + "' target = 'main'>Altavista</a><br><br>\n");newWindow.document.write("<a href='" + webcrawlerSearch + searchValue + "' target = 'main'>WebCrawler</a><br><br>\n");newWindow.document.write("<a href='" + exciteSearch + searchValue + "' target = 'main'>Excite</a><br><br>\n");newWindow.document.close();self.name = "main";}//  End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<form name=search><input type=hidden name=yahoo value="http://search.yahoo.com/search?p="><input type=hidden name=altavista value="http://www.altavista.com/cgi-bin/query?pg=q&what=web&fmt=.&q="><input type=hidden name=webcrawler value="http://www.webcrawler.com/cgi-bin/WebQuery?searchText="><input type=hidden name=excite value="http://www.excite.com/search.gw?trace=a&search=">Search the internet for:<input type=text size=25 name=queryField><br><input type=button value="Search" onClick="searchFunc()"><input type=reset value="Clear"><br>(A separate window will open where you can select a search engine.)</form><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->