这句话怎么错了

yushuzhang7942 2003-08-21 05:01:54
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<script language="VBScript" runat="server">

dim str_sql

set cn = Server.CreateObject("ADODB.Connection")
cn.open "Provider=MSDASQL.1;dsn=sonic;database=sony;uid=ssss;pwd=ssss"

if err.number<>0 then
response.Redirect("error.html")
end if

set rs = Server.CreateObject("ADODB.recordset")
str_sql= "select cityid,cityname from city "
'str_sql="select houseid,housesize,source,cost,configure,notes,statename from house city state where ( cityid=(select cityid from city where ( cityname='"+str_city+"')) and stateid =(select stateid from state where (statename='"+str_state+"' and cityname='"+str_city+"')) and housesize = '"+str_huxing+"' and cost = '"+str_cost+"' and configure = '"+str_config+"' and status =1)"
rs.open str_sql,cn




</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>房源信息查询</title>
<script language="javascript">
var xmldoc
var xsldoc

xmldoc=new ActiveXObject('Microsoft.XMLDOM')
xmldoc.async=false;

xsldoc=new ActiveXObject('Microsoft.XMLDOM')
xsldoc.async=false;

xmldoc.load("house/house.xml")
xsldoc.load("house/house.xsl")

function chech(){
if(isempty(document.form.city.value))
{alert('请选择所在的城市名称,谢谢!');return false;}

if(isempty(document.form.state.value))
{alert('请选择希望居住的区县,谢谢!');return false;}

if(isempty(document.form.huxing.value))
{alert('请选择希望租赁的户型,谢谢');return false;}
}
function isempty(text){
return(text.length>0);
}
function toolong(text){
return(text.length>20);
}

</script>
</head>

<body>
<table width="75%" height="55" border="1" align="center" cellpadding="1" bordercolor="#FFFFFF" bgcolor="#6699CC">
<tr>
<td height="43">
<div align="center"><font color="#FFFFFF" size="5" face="仿宋_GB2312"><strong>欢迎使用查询页面</strong></font></div></td>
</tr>
</table>
<p> </p><hr>
<form name="form1" method="post" action="chaxun.asp" onSubmit="return check()">
<table width="93%" border="0" align="center">
<tr>
<td height="25">
<div align="center">城市:
<select name="city" size="1" id="city">
<%
'Do while(not rs.eof)%>
<option value="<% = rs("cityid")%>"><% = rs("cityname")%></option> 总是提示我这句话有错误, 不知道错在哪里乐 身边没有这方面的高手请指教
<%
'rs.MoveNext
'loop
%>
</select>
</div></td>
<td><div align="center">区县:
<select name="state" size="1" id="state">
<% 'rs.close
'str_sql="select statename,stateid from state"
'rs.open str_sql,cn
'do until rs.eof %>
<option value="<%=rs.field("statename")%>"><%=rs.field("stateid")%></option>
<%
'rs.MoveNext
'loop
%>
</select>
</div></td>
<td><div align="center"> 户型:
<select name="huxing" size="1" id="huxing">
<% rs.close
str_sql="select huxing from house"
rs.open str_sql,cn
dim i
i=0
do until rs.eof
i=i+1%>
<option value="<%rs.field("huxing")%>"><%=i%></option>
<%loop%>
</select>
</div></td>
</tr>
<tr>
<td height="25">
<div align="center"> </div></td>
<td><div align="center"></div></td>
<td><div align="center">
<input type="submit" name="Submit" value="提交查询">
</div></td>
</tr>
</table>
</form>
<hr>
<p> </p>
</body>
</html>
...全文
60 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
lh1012 2003-08-21
  • 打赏
  • 举报
回复
<option value="<% = rs("cityid")%>"><% = rs("cityname")%></option>
这一句应为
<option value=<% = rs("cityid")%>><% = rs("cityname")%></option>
xxrl 2003-08-21
  • 打赏
  • 举报
回复
哈哈 LOL,对头!应该具体说一说错误的地方!
WQ771211 2003-08-21
  • 打赏
  • 举报
回复
不要浪费生命了,把出错的行说一下

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧