帮改一段asp程序,应该很简单,我是新手

来源:百度知道 编辑:UC知道 时间:2024/05/31 07:16:32
<!--#include file="conn.asp"-->(已经正确连接数据库)

<%dim rs2,rs3

set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from products where bookid="&bookid,conn,1,1
rs3.open "select * from bsort order by anclassidorder",conn,1,1
if rs2.eof and rs2.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="anclassid" size="1" id="anclassid" onChange="changelocation(document.myform.anclassid.options[document.myform.anclassid.selectedIndex].value)">
<%
do while not rs2.eof
%>
<option value="<%=rs2("anclassid")%>" <%if rs2("anclassid")=rs3("anclassid") then%>selected<%end if%>><%=trim(rs2("anclass"))%></option>
<%
rs2.m

<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>
</HEAD>

<BODY>

<script language="javascript">
var j;
j=0;
goaler = new Array();
<%set rs_small=conn.execute("select * from smallclass order by id")
if rs_small.eof then%>
goaler[0] = new Array("无小类","","");
<%else
i=0
do while not rs_small.eof%>
goaler[<%=i%>] = new Array("<%=rs_small("smallclass")%>","<%=rs_small("id_bigclass")%>","<%=rs_small("id")%>");

<%rs_small.movenext