代码: function check1(obj){ var url="" var keykey=obj.keykey.value var lindex=obj.category.options[obj.category.selectedIndex].value if (lindex!="更多"){ if(lindex==0) url="/search.php?type=radio CHECKED value=all name=s_type//全部 if(lindex==1) url="/search.php?name=pwuser//用户 location.href=url} else{location.href="http://www.dgdown.com/search.php"} return false } function gotourl(selObj){ if(selObj.options[selObj.selectedIndex].value=="更多"){location.href="http://www.dgdown.com/search.php"}} function WriteSearch(selectedid){ document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><form name=form1 method=post target=_blank onSubmit="return check1(this);"><tr><td width="88" align="center">') document.write('<select name="category" class="clsdiv" onChange="gotourl(this)">') if (selectedid=='0'){document.write('<option value=0 selected>全 部</option>')}else{document.write('<option value=0>全 部</option>')} if (selectedid=='1'){document.write('<option value=1 selected>用 户</option>')}else{document.write('<option value=1>用 户</option>')} document.write('<option Value="更多">更 多...</option>') document.write('</select></td><td width="370"><input name="keykey" type="text" size="50" class="clsdiv"></td><td width="16"></td><td width="102"><INPUT type=image src="images/search_Pic.jpg" width="50" height="27" border=0 name=imageField2></td><td> </td></tr></form></table>')}