其实非常简单,由于你使用的是单选框,则制作起来更加简单。首先定义每一个单选框,则每次传递搜索信息时,将传送关键词和一个单选框代码,在搜索页面,使用SELECT语句,在每个根据传递单选框代码的不同,进行相应的检索。
<body>
<form action="" method="get">
<div class="kuan"><input name="" type="text" /></div><!--搜索框-->
<div class="an"><input name="" type="button" /></div><!--搜索按钮-->
</form>
</body>
CSS样式根据实际自己调整
<style type="text/css">
.kuan input{ width:330px; height:60px; background:background:url(../img/kuan_01.jpg) no-repeat; border:none; float:left}
.an input{ width:120px; height:60px;? background:background:url(../img/an_02.jpg) no-repeat;border:none;? float:left}
</style>
首先,要有搜索框
<form action="地址" method="post" name="searchform">
<input type="text" name="search">
<input type="submit" value="搜索">
</form>
然后呢,当你点击搜索的时候,将包含name属性的属性值也就是你输入的搜索的内容,通过method指定的方式发送到action指定的页面。
在action指定的页面接受获得的具有name属性的属性值,然后根据脚本的不同,搜索数据,然后返回到一个页面进行显示。流程和原理就是这样了。
你这里还有单选或复选,原理是一样的,判断哪个选择了,然后提交页面另一个页面根据选择的进行筛选罢了。
希望我的答案能让你满意