我做了个集成搜素 是单选了 老师说不行,让改成复选框。复选搜索结果显示同一页面 哪个大哥大姐帮改下啊 。万分感谢!<html><head>
<title>中华大百科</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body><form id='form1' name='form1'>
<p align="center"> </p>
<p align="center"> </p>
<p align="center">
<img border="0" src="百科图片.gif" width="660" height="169">
</p>
<p align="center">关键字:
<input type="text" id="topsearchbox" name="keyword" style="font-size:12px" size="60" onmouseover="this.focus()" onfocus="this.select()" onblur="if(value ==''){value='输入关键字'}" onclick="if(this.value=='输入关键字')this.value=''" value="输入关键字">
<input type='submit' id='btntopsearch' onclick="return search()" value=搜索 name="I1" style="font-size: 12px">
</p>
<p align="center"><font style="font-size: 12px">
<input type='radio' name='stype' value='baidu' checked>百度百科
<input type='radio' name='stype' value='britannica'>大英百科
<input type='radio' name='stype' value='wiki'>维基百科
<input type='radio' name='stype' value='hudong'>互动百科
</font>
</td>
</tr>
</table>
</p>
</form><script>
function search()
{var keyword = document.form1.keyword.value;var searchtype = document.form1.stype;var chk = 0;var url = "";for(var i=0;i<searchtype.length;i++)
{if(searchtype[i].checked)
{chk = i;break;}}
switch(chk)
{case 0:
url = "http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word=" + keyword;
break;
case 1:
url = "http://www.britannica.com/bps/search?query" + keyword ;
break;
case 2:
url = "http://zh.wikipedia.org/zh-cn/" + keyword;
break;
case 3:
url = "http://www.hudong.com/wiki/" + keyword;
default:
}
if(chk === 3)
{
document.form1.action = url;
document.form1.method = "post";
document.form1.target = "_blank";
document.form1.submit();
}else
{window.open(url);}}
</script> </body></html>
<title>中华大百科</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body><form id='form1' name='form1'>
<p align="center"> </p>
<p align="center"> </p>
<p align="center">
<img border="0" src="百科图片.gif" width="660" height="169">
</p>
<p align="center">关键字:
<input type="text" id="topsearchbox" name="keyword" style="font-size:12px" size="60" onmouseover="this.focus()" onfocus="this.select()" onblur="if(value ==''){value='输入关键字'}" onclick="if(this.value=='输入关键字')this.value=''" value="输入关键字">
<input type='submit' id='btntopsearch' onclick="return search()" value=搜索 name="I1" style="font-size: 12px">
</p>
<p align="center"><font style="font-size: 12px">
<input type='radio' name='stype' value='baidu' checked>百度百科
<input type='radio' name='stype' value='britannica'>大英百科
<input type='radio' name='stype' value='wiki'>维基百科
<input type='radio' name='stype' value='hudong'>互动百科
</font>
</td>
</tr>
</table>
</p>
</form><script>
function search()
{var keyword = document.form1.keyword.value;var searchtype = document.form1.stype;var chk = 0;var url = "";for(var i=0;i<searchtype.length;i++)
{if(searchtype[i].checked)
{chk = i;break;}}
switch(chk)
{case 0:
url = "http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word=" + keyword;
break;
case 1:
url = "http://www.britannica.com/bps/search?query" + keyword ;
break;
case 2:
url = "http://zh.wikipedia.org/zh-cn/" + keyword;
break;
case 3:
url = "http://www.hudong.com/wiki/" + keyword;
default:
}
if(chk === 3)
{
document.form1.action = url;
document.form1.method = "post";
document.form1.target = "_blank";
document.form1.submit();
}else
{window.open(url);}}
</script> </body></html>
<title>中华大百科</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body><form id='form1' name='form1'>
<p align="center"> </p>
<p align="center"> </p>
<p align="center">
<img border="0" src="百科图片.gif" width="660" height="169">
</p>
<p align="center">关键字:
<input type="text" id="topsearchbox" name="keyword" style="font-size:12px" size="60" onmouseover="this.focus()" onfocus="this.select()" onblur="if(value ==''){value='输入关键字'}" onclick="if(this.value=='输入关键字')this.value=''" value="输入关键字">
<input type='submit' id='btntopsearch' onclick="return search()" value=搜索 name="I1" style="font-size: 12px">
</p>
<p align="center"><font style="font-size: 12px">
<input type='radio' name='stype' value='baidu' checked>百度百科
<input type='radio' name='stype' value='britannica'>大英百科
<input type='radio' name='stype' value='wiki'>维基百科
<input type='radio' name='stype' value='hudong'>互动百科
</font>
</td>
</tr>
</table>
</p>
</form><script>
function search()
{var keyword = document.form1.keyword.value;var searchtype = document.form1.stype;var chk = 0;var url = "";for(var i=0;i<searchtype.length;i++)
{if(searchtype[i].checked)
{chk = i;break;}}
switch(chk)
{case 0:
url = "http://baike.baidu.com/w?ct=17&lm=0&tn=baiduWikiSearch&pn=0&rn=10&word=" + keyword;
break;
case 1:
url = "http://www.britannica.com/bps/search?query" + keyword ;
break;
case 2:
url = "http://zh.wikipedia.org/zh-cn/" + keyword;
break;
case 3:
url = "http://www.hudong.com/wiki/" + keyword;
default:
}
if(chk === 3)
{
document.form1.action = url;
document.form1.method = "post";
document.form1.target = "_blank";
document.form1.submit();
}else
{window.open(url);}}
</script> </body></html>
httpwebrequest抓取页面数据