function searchsubmit(){      
     if(document.searchform.SearchRadio[0].checked){     
document.searchform.actionid.value = "851:861"
document.searchform.action = "a.jsp";
}else{
document.searchform.actionid.value = "951:961"
document.searchform.action = "b.jsp";
}
document.searchform.method="get"
document.searchform.submit();   }

解决方案 »

  1.   

    <script>
    function searchsubmit()
    {
       if(searchform.SearchRadio[0].checked)
           alert("供货信息")
       if(searchform.SearchRadio[1].checked)
           alert("采购信息")
    }
    </script><form name="searchform">
       <td valign="bottom" height="40">关键字:
      <input type=hidden name=actionid>
      <input type="text" name="search" class="textfile1">
      <input type="radio" name="SearchRadio" checked value="ghxx">供货信息 
      <input type="radio" name="SearchRadio" value="cgxx">采购信息
      <input type="radio" name="SearchRadio" value="cpzs">产品展示 
      <input type="radio" name="SearchRadio" value="hyzx">行业资讯
               <img style="cursor:hand" border="0" name="ImageSearchSubmit" src="images/suosuo.gif" onClick="javascript:searchsubmit()" width="46" height="21">
     </td>
    </tr>
    </form>