function doit(){ var sel_val=$("#type").val(); if (sel_val==‘‘) { $("#bigClassId1").hide(); $("#bigClassId2").hide(); } if (sel_val==1) { $("#bigClassId1").show(); $("#bigClassId2").hide(); } if (sel_val==2) { $("#bigClassId2").show(); $("#bigClassId1").hide(); } } </script>--> <select name="type" id="type" onchange="doit();"> <option value="">店铺</option> <option value="1">无</option> <option value="2">有</option> </select> <select name="bigClassId" id="bigClassId"> <option value="">类别</option> <?php $rs=query("SELECT id,categoryName FROM tb_easy_category WHERE grade in(1,2) AND categoryId=0 AND state = 0"); while($row=fetch_array($rs)){ echo "<option value=".$row["id"].">".$row["categoryName"]."</option>"; } free_result($rs); ?> </select>
时间: 2024-12-14 21:56:54