我想定义一个函数 funciong picture(x){} 
请问怎么将x加入到google的图片搜索(http://images.google.cn/imghp?hl=zh-CN&tab=wi)窗口的文本框中,并自动查找。 
也就是我想用这个函数完成将形参的值在google图片搜索的功能。调用这个函数时要直接看到结果! 
谢谢啦!!!

解决方案 »

  1.   


      <form action="http://images.google.cn/images" name=f target="_blank">
        <input name=hl type=hidden value=zh-CN>
        <input autocomplete="off" maxlength=2048 name=q size=40 title="搜索图片" value=""> 
        <input name=btnG type=submit value="搜索图片">
      </form>直接把这段放在你的网页就能搜了.
      

  2.   

    funciong picture(x)
    {
    location.href='http://images.google.cn/images?hl=zh-CN&q='+x+'&btnG=%E6%90%9C%E7%B4%A2%E5%9B%BE%E7%89%87&gbv=2&aq=f&oq=';
      

  3.   


    <input type="button" value="图片搜索" onclick="picture('春')">
    <script language="javascript">
    <!--
    function picture(x){
    window.location.href="http:\/\/images.google.cn\/images?hl=zh-CN&q="+x+"&btnG=%E6%90%9C%E7%B4%A2%E5%9B%BE%E7%89%87&gbv=2&aq=x&oq="

    //-->
    </script>
      

  4.   

    感谢各位的回答,但那个picture(x)函数,执行后能不能让它再打开一个新窗口呢?谢谢大家的帮助。
      

  5.   

    把=号后面的加到
    window.open("这里")
    就行了..