sabato 30 agosto 2008

[Js] GooGle Search

Descrizione
Permette di eseguire una semplice ricerca su GooGle.

Codice
<html>
<head>
<title>
GooGle Search</title>
<script language=JavaScript>
function googSearch() {
if (document.googsearch.search.value!="") {
window.open("http://www.google.com/search?hl=en&q=" + document.googsearch.search.value) ; } else {
alert("Inserire del testo da cercare!")
document.googsearch.search.focus();}}
</script>
</head>
<body>

<div align=center>
<form name="googsearch">
<b>GooGle Search</b><br><br>
<input
name=search type=text size=20>
<input type="button" value="Search" onclick="return googSearch();">
</form>
</div>
</body>
</html>

0 commenti: