如题

解决方案 »

  1.   

    <title>无标题文档</title>
    <script type="text/javascript">
    function finds(){
    var a=document.getElementById("test").value;
    window.open("http://www.baidu.com/s?wd="+encodeURIComponent(a));
    }
    </script>
    </head><body>
    <input type="text" id="test">
    <input type="button" onclick="finds()" value="find">
    </body>
    不知这样行不行  试了几个貌似可以  以前看到过一个例子 忘了放哪了 我给你找找
      

  2.   

    问你一下,为什么用var a=document.getElementByName("test").value;下面用<input type="button" name="test">搜素的时候就会成搜索undefined了