开发者

Why doesn't this searchbox work?

  <!--got this from http://www.getgooglesearch.com/-->
  <fieldset id="searchbox">  
    <form method="get" action="http://开发者_运维百科www.google.com/search">
      <input type="text"   name="q" size="25" maxlength="255" value="" />
      <input type="image" src="../media/google.gif" alt="Submit button" title="Submit" /><br />
      <input type="checkbox"  name="sitesearch" value="arenanewbs.com" checked="checked" />Only search Areneanewbs.com<br />
    </form>
  </fieldset>

If you uncheck the box the google site search works, but on my actual site it doesn't work. Can anyone help me?


I think the name should be site instead of sitesearch


It " does not work ", because the search returns no results on the page you provided. The arenanewbs.com domain you provided does not even exist.

See this jsfiddle for a proof, that the searches for different pages actually work (in my example this is bbc.co.uk and " wall street " phrase).


make value="http://www.google.com" and it will work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜