<script language=javascript>
 function checkNum(frm)
 {
  if(window.event.keyCode > '9'.charCodeAt(0) || 
   window.event.keyCode < '0'.charCodeAt(0))
  {
   /*用下面两条语句中的任何一条，都可以实现取消这次输入的字符值*/
   //window.event.keyCode = 0;
   window.event.returnValue = false;
  }
 }
</script>
<table border="0" width="100%" id="table1">
<form name="form_fox" onsubmit="return checkinput()" action="sefang.asp" method="post" target="_blank">
	<tr>
		<td align="right" width="67">所属:</td>
		<td><select size="1" name="leixing">
		<option selected value="0">不限</option>
		<option value="1">出租</option>
		<option value="2">求租</option>
		<option value="3">出售</option>
		<option value="4">求购</option>
		</select></td>
	</tr>
	<tr>
		<td align="right" width="67">房源类型:</td>
		<td>
			<select size="1" name="fx">
			<option selected value="0">全部</option>
			<option value="1">普通住宅</option>
			<option value="2">小高层住宅</option>
			<option value="3">高层住宅</option>
			<option value="4">别墅</option>
			<option value="5">写字楼</option>
			<option value="6">酒店式公寓</option>
			<option value="7">商住两用</option>
			<option value="8">商铺</option>
			<option value="9">厂房</option>
			</select></td>
	</tr>
	<tr>
		<td align="right" width="67">户型:</td>
		<td><select id="option.room" size="1" name="ss">
		<option value="1" selected>1室户</option>
		<option value="2">2室户</option>
		<option value="3">3室户</option>
		<option value="4">4室户</option>
		<option value="5">5室户</option>
		<option value="6">6室户</option>
		<option value="7">7室户</option>
		<option value="8">8室户</option>
		<option value="9">9室户</option>
		</select> 　</td>
	</tr>
	<tr>
		<td align="right" width="67">区域:</td>
		<td><%
dim rss
dim sqls
dim count
set rss=server.createobject("adodb.recordset")
sqls = "select * from FOX_shi order by paixu desc"
rss.open sqls,conn,1,1
%>
                              <SCRIPT language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rss.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rss("shi"))%>","<%= trim(rss("sheng"))%>","<%= trim(rss("id"))%>");
        <%
        count = count + 1
        rss.movenext
        loop
        rss.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form_fox.shi.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.form_fox.shi.options[document.form_fox.shi.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
                      </SCRIPT>
                              <%
sqls = "select * from FOX_sheng order by paixu desc"
rss.open sqls,conn,1,1
if rss.eof and rss.bof then
response.write "请先添加栏目。"
response.end
else
%>
                              <SELECT name="sheng" onChange="changelocation(document.form_fox.sheng.options[document.form_fox.sheng.selectedIndex].value)" size="1" style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: #FFFFFF 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #a2a2a2 1px solid; COLOR: #333333; FONT-SIZE: 9pt; HEIGHT: 19px;">
                                <OPTION selected value="0">=区域=</OPTION>
                                <%do while not rss.eof
%>
                                <OPTION value="<%=trim(rss("id"))%>"><%=trim(rss("sheng"))%></OPTION>
                                <%
        rss.movenext
        loop
	    end if
        rss.close
%>
                              </SELECT>
                              <SELECT name="shi"  style="BACKGROUND-COLOR: #eeeeee; BORDER-BOTTOM: #FFFFFF 1px solid; BORDER-LEFT: #a2a2a2 1px solid; BORDER-RIGHT: #ffffff 1px solid; BORDER-TOP: #a2a2a2 1px solid; COLOR: #333333; FONT-SIZE: 9pt; HEIGHT: 19px;">
                                <OPTION selected value="0">=细分=</OPTION>
                              </SELECT></td>
	</tr>
	<tr>
		<td align="right" width="67">发布日期</td>
		<td><select id="option.postTimeExt" name="rq" size="1">
		<option value="0" selected>不限</option>
		<option value="1">近一天</option>
		<option value="2">近两天</option>
		<option value="3">近三天</option>
		<option value="7">近一周</option>
		<option value="14">近两周</option>
		<option value="30">近一月</option>
		<option value="60">近两月</option>
		<option value="90">近三月</option>
		</select> </td>
	</tr>
	<tr>
		<td align="right" width="67">价格:</td>
		<td><input type="text" name="ja" size="4" onkeypress="checkNum(this.form)">-<input type="text" name="jd" size="4" onkeypress="checkNum(this.form)">元</td>
	</tr>
	<tr>
		<td align="right" width="67">　</td>
		<td>
			<input class="inputb" border="0" name="I5" type="submit" value="查询"></td>
	</tr>
	</form>
</table></body></html>

</body></html>