<html>
<body>
<SCRIPT language=javascript>
function index_search(){
var v = document.getElementById("k").value;
var o = document.getElementsByName("o");
if(o[0].checked == true)
window.open("http://www.google.com/search?hl=zh-CN&q="+v);
if(o[1].checked == true)
window.open("http://www.baidu.com/s?wd="+v);

return false;
}
//-->
</SCRIPT><META content="MSHTML 5.00.3700.6699" name=GENERATOR>
<CENTER>
<div align="center">
<TABLE id=table966 border=0 cellspacing="0" cellpadding="0" width="944">
    <TBODY>
        <FORM name="f" id="f" onsubmit="return index_search()">
            <TR>
                <TD noWrap> 
                <INPUT class=input_box maxLength=64 size=26 value=网页特效代码 name="k" id="k"> 
                <INPUT type=submit value=搜一下 name=submit> <font color="#008000">
                <INPUT type=radio value=0 name="o">  Google 
                <INPUT type=radio value=2 name="o" checked> 百度                 
                </tr>
            </tr>
    </TBODY>
</TABLE></div>
</table>
</body>
</html>

解决方案 »

  1.   

    谢谢回答.
    可以在FF中打搜索了,
    但是在FF下  baidu 搜索汉字 出现乱码,而google没事.
    请再次赐教.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head>
    <body><SCRIPT language=javascript>
    function index_search(){
        var v = document.getElementById("k").value;
        var o = document.getElementsByName("o");
        if(o[0].checked == true)
            window.open("http://www.google.com/search?hl=zh-CN&q="+v);
        if(o[1].checked == true)
            window.open("http://www.baidu.com/s?wd="+v);    
        return false;
    }
    //-->
    </SCRIPT><META content="MSHTML 5.00.3700.6699" name=GENERATOR>
    <CENTER>
    <div align="center">
    <TABLE id=table966 border=0 cellspacing="0" cellpadding="0" width="944">
        <TBODY>
            <FORM name="f" id="f" onsubmit="return index_search()">
                <TR>
                    <TD noWrap> 
                    <INPUT class=input_box maxLength=64 size=26 value=网页特效代码 name="k" id="k"> 
                    <INPUT type=submit value=搜一下 name=submit> <font color="#008000">
                    <INPUT type=radio value=0 name="o">  Google 
                    <INPUT type=radio value=2 name="o" checked> 百度                 
                    </tr>
                </tr>
        </TBODY>
    </TABLE>
    </div>
    </table>
    </body>
    </html>
     
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />这里应该没问题吧???????window.open("http://www.baidu.com/s?wd="+v); 这里可能有问题吗????
    我试了几次都没有成功,谢谢指点了.
      

  2.   

    http://www.xue5.com/itedu/200802/102480.html
    这个是关于window.open的用法,我想应该不是那里的原因。lz不妨改一下这个:
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      

  3.   

    试试这个
    window.open("http://www.baidu.com/s?ie=gb2312&wd="+v);