English 中文(简体)
网站中谷歌搜索的文本字段
原标题:Text Field for Google Search in the Website
  • 时间:2011-05-28 20:39:32
  •  标签:
  • html
  • css

I am developing a simple website and I want to add Google Search to the website. I created a simple box and add Google Search to it, so when anyone wants to search about something, he just needs to write in that box and then he will be directed to Google Search Results page. The problem is I want to show the Google Search Results page in a new browser window or tab instead of loading it in the same browser window. So how can I do that?

我的代码:

<div id="search"> <input type="text" value="Search"> <a href="#"><img src="images/go.gif" alt="" width="26" height="26" /></a> </div>

最佳回答

您需要自定义搜索api

您可以使用JSON/Atom自定义搜索API以编程方式从自定义搜索引擎检索Google自定义搜索结果。

像所有的googleapi一样,它有很好的文档记录,并且有一些示例可以帮助您入门。

编码快乐!

问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签