关于下拉框选择项目,内容显示所有,页面刷新,但不归类。
选择下拉框内项目时页面刷新,但是依旧显示所有内容,没有刷出分类效果。高手看一下哪里没改好。页面图片
源代码如下:
程序代码:
<%if request.Cookies("shiwei_username")="" then%> <script language="javascript">top.location.href="../index.asp"</script> <% response.end end if %> <!-- #include file="../conn2.asp" --> <!-- #include file="../const.asp" --> <!-- #include file="../inc/function.asp" --> <html> <head> <title>水费到期提醒</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <link href="../style/style.css" rel="stylesheet" type="text/css"> <style>body {background-color:#FFFFFF;}</style> <script> function CheckAll(form) { for (var i=0;i<form.elements.length;i++) { var e = form.elements[i]; if (e.name != 'chkall') e.checked = form.chkall.checked; } } </script> </HEAD> <BODY> <%if fla25="0" and request.Cookies("shiwei_id")<>"1" then%> <br><center><img src="../images/note.gif" align="absmiddle"> <font color="#FF0000">你不具备此权限,请与管理员联系!</font></center> <% response.end end if if request("hid")="ok" then conn.execute("update yezhu set wenhou=#"&date()&"# where id="&request("id")) end if nowxiaoqu=request("xiaoqu") %> <table width="100%" border="0" cellpadding="0" cellspacing="2" align="center"> <form name="form2"> <tr> <td width="1%" height="30"> </td> <td width="99%" align="left"> <% sql="select * from xiaoqu order by id" set rs_qu=conn.execute(sql) %> 请选择小区: <select name="xiaoqu" onChange="form2.submit()"> <option value="">所有小区</option> <%do while rs_qu.eof=false%> <option value="<%=rs_qu("id")%>"<%if trim(cstr(rs_qu("id")))=nowxiaoqu then%> selected="selected"<%end if%>><%=rs_qu("xiaoqu")%></option> <% rs_qu.movenext loop %> </select></td></tr></form></table> <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#C4D8ED"> <tr><td><img src="../images/r_1.gif" alt="" /></td> <td width="100%" background="../images/r_0.gif"> <table cellpadding="0" cellspacing="0" width="100%"> <tr> <td> 水费到期提醒</td> <td align="right"> </td> </tr> </table> </td> <td><img src="../images/r_2.gif" alt="" /></td> </tr> <tr> <td></td> <td> <form name="form1" > <table align="center" cellpadding="4" cellspacing="1" class="toptable grid" border="1" width="100%"> <tr align="center"> <td class="category" height="30">所在小区</td> <td class="category">楼宇单元</td> <td class="category">房号</td> <td class="category">业主姓名</td> <td class="category">电话</td> <td class="category">缴费日期</td> <td class="category">操作</td> </tr> <% if nowxiaoqu="" then sql="select * from yezhu order by xiaoqu,id" else sql="select * from yezhu where xiaoqu="&nowxiaoqu&" order by id" end if sql="select * from yezhu where ((month(shui)>="&month(date())&" and month(shui)<="&month(date()+5)&" and (shui)>="&day(date())&" and day(shui)<="&day(date()+5)&") and year(wenhou)<>"&year(date())&")" 'sql="select * from yezhu where (datediff('y','"&date()&"',shengri)>=0 and datediff('y','"&date()+tiqian&"',shengri)<=0 and yinyang='阳') or (datediff('y','"&WDateToEDate(now(),"1")&"',shengri)>=0 and datediff('y','"&WDateToEDate(now(),"1")+tiqian&"',shenri)<=0 and yinyang='阴')" set rs_yezhu=conn.execute(sql) do while rs_yezhu.eof=false %> <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''"> <td align=center height=25><%set rs_qu=conn.execute("select * from xiaoqu where id="&rs_yezhu("xiaoqu"))%><%if rs_qu.eof then%><%else%><%=rs_qu("xiaoqu")%><%end if%></td> <td align=center><%=rs_yezhu("louyu")%></td> <td align=center><%=rs_yezhu("fanghao")%></td> <td align=center><%=rs_yezhu("username")%></td> <td align=center><%=rs_yezhu("tel")%></td> <td align=center><%=rs_yezhu("shui")%></td> <td align=center><input type=button value='开始收费' onClick=window.open("/1/produit/produit_sell.asp") class="button"> <input type=button value='已经缴费,取消提醒' onclick=window.location.href='?hid=ok&id=<%=rs_yezhu("id")%>' class="button"></td> </tr> <% nowbaojing1=nowbaojing1&"ok" rs_yezhu.movenext loop %> <%if nowbaojing1="" then%> <tr onMouseOver="this.className='highlight'" onMouseOut="this.className=''"> <td align=center height=25 colspan="6" style="color:#ff0000">目前没有缴费提醒</td> </tr> <%end if%> </table> </form> </td> <td></td> </tr> <tr><td><img src="../images/r_4.gif" alt="" /></td> <td></td> <td><img src="../images/r_3.gif" alt="" /></td> </tr></table></body></html>
[ 本帖最后由 天蝎风 于 2010-11-20 12:33 编辑 ]