消除或隐藏SOSO搜索框的checkbox

来源:百度知道 编辑:UC知道 时间:2024/06/30 02:54:46
代码如下,要求当然是要能执行搜索。
<table width="100%" border="0">
<tr>
<td>
<table width="400" border="0" align="center">
<script type="text/javascript">
function search4()
{
if(websearch.soso.checked)
window.open("http://www.soso.com/q?w="+websearch.key.value,"mspg10");
return false;
}
</script>

<td >
<form name="websearch" onSubmit="return(search4())" >
<input name="key" id="key" value="" size="55">
<BR><input name="soso" type="checkbox" id="soso" value="soso" checked >
<input type="submit" value="SOSO" >
</form></td>
</tr>
</t

首先要把JS中search4函数中的判断复选框是否选中去掉,其次将checkbox的那行input去掉,代码如下
<table width="100%" border="0">
<tr>
<td>
<table width="400" border="0" align="center">
<script type="text/javascript">
function search4()
{
window.open("http://www.soso.com/q?w="+websearch.key.value,"mspg10");
return false;
}
</script>

<td >
<form name="websearch" onSubmit="return(search4())" >
<input name="key" id="key" value="" size="55">
<BR>
<input type="submit" value="SOSO" >
</form></td>
</tr>
</table></td>
</tr>
</table>