参考:http://5255.102.tofor.com/bbs把中间那个搜索样式改
我弄的那个怎么在本页输入关键词那里写什么按搜索只出来百度的首页根本不象下面我申请的那个一样
我本来的代码是:
<table cellpadding=3 cellspacing=1 align=center class=tableborder1>
<TR>
<Th align=left height=25>-=> 超级搜索引擎 </Th>
</TR>
<TR>
<TD class=tablebody1 vAlign=top width="100%">
<FORM id=form1 name=form1 action=http://mp3.baidu.com/method=get target=_blank> 文件:<INPUT class=2 type=checkbox CHECKED value=1
name=fmp3>MP3 <INPUT class=2 type=checkbox CHECKED value=1 name=frm>RM <INPUT class=2
type=checkbox value=1 name=fswf>SWF <INPUT class=2 type=checkbox value=1
name=fwma>WMA <INPUT class=2 type=checkbox value=1 name=fasf>ASF
协议:<INPUT class=2
type=checkbox CHECKED value=1 name=phttp> http <INPUT class=2 type=checkbox
value=1 name=pftp> ftp <INPUT class=2 type=checkbox value=1 name=prtsp> rtsp
<INPUT class=2 type=checkbox value=1 name=ppnm> pnm <INPUT class=2 type=checkbox CHECKED
value=1 name=pmms> mms <input class=2 onblur='if (value ==""){value="请输入歌手名或歌名"}'
onfocus='if (value =="请输入歌手名或歌名"){value =""}' value=请输入歌手名或歌名 size="18" name=key> <input class=2 id=submit1 style="BACKGROUND-COLOR: #ebebeb" type=submit value=搜索 name=submit1 cachename="go">
</TD></FORM></TR>
<tr>
<TD class=tablebody1 vAlign=top width="100%" height=25>
<FORM name=gs action=http://www.baidu.com/method=get
target=_blank><INPUT type=hidden value=zh-CN name=hl> <INPUT type=hidden
value=zh-CN name=inlang> <INPUT type=hidden value=GB2312 name=ie>
<p> 关键词:<input class=2
maxLength=2048 size=31 name=q> <INPUT class=2 type=radio CHECKED value="" name=lr>搜索所有网站 <INPUT class=2 type=radio
value=lang_zh-CN|lang_zh-TW name=lr>搜索所有中文网页 <INPUT class=2 type=radio
value=lang_zh-CN name=lr>搜索中文(简体)网页 <input class=2 style="BACKGROUND-COLOR: #ebebeb" type=submit value=百度搜索 name=btnG></p>
</TD>
</tr>
<TR>
</FORM></TR>
</TR>
</table>
<br>
帮忙给改改或者谁知道哪有这样的代码写下来
先谢谢了
參考答案:<SCRIPT language=javascript>
function gowhere1(formname)
{
var url;
if (formname.myselectvalue.value == "0")
{
url = "";
document.search_form1.tn.value = "baidu";
formname.method = "get";
}
if (formname.myselectvalue.value == "1")
{
url = "";
document.search_form1.tn.value = "baidump3";
document.search_form1.ct.value = "***********";
document.search_form1.lm.value = "-1";
}
if (formname.myselectvalue.value == "4")
{
document.search_form1.tn.value = "news";
document.search_form1.cl.value = "2";
document.search_form1.rn.value = "20";
url = "";
}
if (formname.myselectvalue.value == "5")
{
document.search_form1.tn.value = "baiduiamge";
document.search_form1.ct.value = "***********";
document.search_form1.cl.value = "2";
document.search_form1.lm.value = "-1";
url = "";
}
if (formname.myselectvalue.value == "6")
{
url = "";
document.search_form1.tn.value = "baiduPostSearch";
document.search_form1.ct.value = "***********";
document.search_form1.rn.value = "10";
document.search_form1.lm.value = "65536";
}
formname.action = url;
return true;
}
</SCRIPT>
<form name="search_form1" target="_blank" onsubmit="return gowhere1(this)">
<table width="460" height="60" border="0" bgcolor="#FFFFFF" cellpadding="0" cellspacing="0" style=font-family:宋体><tr><td>
<TABLE width="460" height="80" border=0 cellPadding=0 cellSpacing=0>
<INPUT name=myselectvalue type=hidden value=0>
<INPUT name=tn type=hidden>
<INPUT name=ct type=hidden>
<INPUT name=lm type=hidden>
<INPUT name=cl type=hidden>
<INPUT name=rn type=hidden>
<TR>
<TD width="8%" valign="bottom">
<DIV align=center><a href=""
alt="Baidu" align="bottom" border="0"></a></DIV></TD>
<TD vAlign=bottom width="92%">
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=4; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">新闻</FONT>
<INPUT CHECKED name=myselect onclick=javascript:this.form.myselectvalue.value=0; type=radio value=0>
<SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">网页</FONT></SPAN>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=1; type=radio value=1>
<SPAN class=f12><FONT color=#0000cc style="FONT-SIZE: 12px">mp3</FONT></SPAN>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=6; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">贴吧</FONT>
<INPUT name=myselect onclick=javascript:this.form.myselectvalue.value=5; type=radio value=0>
<FONT color=#0000cc style="FONT-SIZE: 12px">图片</FONT>
<TABLE align=right border=0 cellPadding=0 cellSpacing=0 width="100%">
<TBODY>
<TR>
<TD><FONT style="FONT-SIZE: 12px">
<input id=word name=word size="40">
</FONT> <input type="submit" value="百度搜索"> </TD></TR>
</form>
这个好使,好看,谢我吧