• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

Sign in to follow this  
Followers 0

Pesquisa google completa

1 post in this topic

este script mt simples permitevos ter uma pesquisa google completa (imagens, web, noticias...) no vosso website

o html

               <form name="search_google" method="get" action="http://www.google.pt/search">
                        <input type="radio" checked="checked" name="reason" />web
		<input type="radio" name="reason" />imagens
		<input type="radio" name="reason" />grupos
		<input type="radio" name="reason" />noticias
		<input class="input_google" type="text" name="q" value="google" />
		<input class="submit_google" type="hidden" name="h1" value="pt" />
		<input class="submit" type="submit" value="vai" onclick="return ActionDeterminator();" />

o javascript

<script type="text/javascript" language="JavaScript">
<!-- Copyright 2003 Bontrager Connection, LLC
// See article "Changing Form Action URLs On-The-Fly" linked
// from URL http://willmaster.com/possibilities/archives
// for more information about how to use this code.
function ActionDeterminator()
if(document.search_google.reason[0].checked == true) {
document.search_google.action = 'http://www.google.pt/search';
if(document.search_google.reason[1].checked == true) {
document.search_google.action = 'http://www.google.pt/images';
if(document.search_google.reason[2].checked == true) {
document.search_google.action = 'http://www.google.pt/groups';
if(document.search_google.reason[3].checked == true) {
document.search_google.action = 'http://www.google.pt/news';
return true;
// -->

ja ta :confused:

fiquem bem


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0