| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 557 人关注过本帖
标题:错错错错错错错!!!!!
只看楼主 加入收藏
a309223515
Rank: 2
等 级:论坛游民
帖 子:29
专家分:10
注 册:2010-4-8
结帖率:77.78%
收藏
已结贴  问题点数:20 回复次数:4 
错错错错错错错!!!!!
response.write("这几天在帮做一个网站的后台,做到了商品的添加页面时碰到麻烦了,第一行的还能显示,下面的就显示不了,眼都看成熊猫眼了,就是找不出是哪出了问题.麻烦各位高人帮看一下,谢谢........")
<%
        set con=server.CreateObject("ADODB.Connection")
        con.open "Driver={Microsoft Access Driver (*.mdb)};dbq="&server.MapPath("../Shopping_data/Shopping.mdb")
        %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
-->
</style>

</head>
<%dim count
set rs=server.createobject("adodb.recordset")
rs.open "select * from Pr_B_class",con,1,1
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from Pr_c_class",con,1,1
%>
<script language = "JavaScript">
var onecount;
var threecount;
onecount=0;
threecount=0

subcat3=new Array();
<%
   count = 0
   do while not rs2.eof
%>
subcat3[<%=count%>] = new Array("<%= trim(rs2("C_classname"))%>","<%= rs2("B_classid")%>","<%= rs2("C_classID")%>");
<%
        count = count + 1
        rs2.movenext
        loop
        rs2.close
%>
threecount=<%=count%>;

subcat = new Array();
<%
   count = 0
   do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("B_classname"))%>","<%= rs("A_classID")%>","<%= rs("B_classid")%>");
<%
        count = count + 1
        rs.movenext
        loop
        rs.close
%>
        
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form1.Pr_B_class.length = 0;
    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            {
             document.form1.Pr_B_class.options[document.form1.Pr_B_class.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
     changelocation3(document.form1.Pr_B_class.options[document.form1.Pr_B_class.selectedIndex].value)
            
    }   
   
function changelocation3(locationid)
    {
    document.form1.Pr_C_class.length = 0;

    var locationid=locationid;
    var i;
    for (i=0;i < threecount; i++)
        {
            if (subcat3[i][1] == locationid)
            {
             document.form1.Pr_C_class.options[document.form1.Pr_C_class.length] = new Option(subcat3[i][0], subcat3[i][2]);
            }        
        }
        
    }
//-->
</script>
<body>
<form action="" method="post" name="form1" class="STYLE1" id="form1">
  <table width="1060" height="567" border="0" align="center" cellspacing="0" bordercolor="#010101" bgcolor="#FFFFFF">
    <tr>
      <td width="320" align="right" bgcolor="#F3F3F3">选择商品的分类:</td>
      <td width="714" bgcolor="#F3F3F3">大类:
        <label>
        <%
    rs.open "select * from Pr_A_class",con,1,1
    if rs.eof and rs.bof then
    response.write "请先添加栏目。"
    response.end
    else
%>
        <select name="Pr_A_class" size="1" id="Pr_A_class" onChange="changelocation(document.form1.Pr_A_class.options[document.form1.Pr_A_class.selectedIndex].value)">
          <option selected="selected" value="<%=rs("A_classID")%>"><%=trim(rs("A_classname"))%></option>
          <%      dim selclass
         selclass=rs("A_classID")
        rs.movenext
        do while not rs.eof
%>
          <option value="<%=rs("A_classID")%>"><%=trim(rs("A_classname"))%></option>
          <%
        rs.movenext
        loop
        end if
        rs.close
%>
        </select>
        </label>
小类:
<label>
<select name="Pr_B_class" size="1" id="Pr_B_class" onChange="changelocation3(document.form1.Pr_B_class.options[document.form11.Pr_B_class.selectedIndex].value)">
  <%rs.open "select * from Pr_B_class where A_classID="&selclass,con,1,1
if not(rs.eof and rs.bof) then
%>
  <%
                                 dim selclass3
                  selclass3=rs("B_classID")
do while not rs.eof
  response.write  "<option value="&rs("B_classID")
  if shopxpse_id=rs("B_classID") then response.write " selected "
  response.write ">"&trim(rs("B_classname"))&"</option>"  
rs.movenext
loop
end if
        rs.close
        set rs = nothing
        
%>
</select>
</label>
三级分类:
<select name="Pr_C_class" id="Pr_C_class">
  <%
        rs.open "select * from Pr_c_class",con,1,1
    if rs.eof and rs.bof then
    response.write "暂时没有子分类"
        else
        rs2.open "select * from Pr_c_class where B_classID="&selclass3,con,1,1
if not(rs2.eof and rs2.bof) then
do while not rs2.eof%>
  <option value="<%=rs2("C_classID")%>"<%if Pr_C_class=rs2("C_classID") then %> selected="selected" <%end if %> ><%=rs2("C_classname")%></option>
  <% rs2.movenext
loop


end if
        rs2.close
        set rs2= nothing
%>
</select>
<%
 
 end if
        rs.close
        set rs = nothing
        
%></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><label>
        <%
        set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=1",con,1,1
        %>
        <input name="1" type="text" id="1" value="<%=rss("FieldName")%>" size="15" />
        </label>
      </td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><label>
        <input name="Productname" type="text" id="Productname" size="30" />
      </label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">标题&lt;Title&gt;</td>
      <td bgcolor="#F3F3F3"><label>
        <input name="PrTitle" type="text" id="PrTitle" size="50" />
      </label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">Meta值-描述&lt;description&gt;</td>
      <td bgcolor="#F3F3F3"><label>
        <input name="Prdescription" type="text" id="Prdescription" size="50" />
      </label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">Meta值-关键词&lt;keywords&gt;</td>
      <td bgcolor="#F3F3F3"><label>
        <input name="PrMeta" type="text" id="PrMeta" size="50" />
      </label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><label>
        <%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=11",con,1,1
        %>
        <input name="11" type="text" id="11" value="<%=rss("FieldName")%>" size="15" />
      </label></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><input type="text" name="PrFoot" id="PrFoot" />
        (不同尺寸之间用/隔开)</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=12",con,1,1
        %>
          <input name="12" type="text" id="12" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><input type="text" name="PrColor" id="PrColor" />
        (不同颜色之间用/隔开) </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=2",con,1,1
        %>
          <input name="2" type="text" id="2" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><input name="Brand" type="text" id="Brand" size="15" />
         
        <%
        'set con=server.CreateObject("ADODB.Connection")
        'con.open "Driver={Microsoft Access Driver (*.mdb)};dbq="&server.MapPath("../Shopping_data/Shopping.mdb")
        set rsss=server.CreateObject("ADODB.Recordset")
        rsss.open "select * from Brand where BrandID",con,1,1
        %>
          <select name="select2" onChange="(document.form11.Brand.value=this.options[this.selectedIndex].value)">
            <option>请选择品牌</option>
            <%
        do while not rsss.eof
        %>
            <option value="<%=rsss("BrandName")%>"><%=rsss("BrandName")%></option>
            <%
        rsss.movenext
        loop
        %>
          </select>
      </td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=9",con,1,1
        %>
          <input name="9" type="text" id="9" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><input type="text" name="PrNumber" id="PrNumber" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=3",con,1,1
        %>
          <input name="3" type="text" id="3" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><input type="text" name="Prnorm" id="Prnorm" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=4",con,1,1
        %>
          <input name="4" type="text" id="4" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3"><label>
        <input name="Unit" type="text" id="Unit" size="7" />
        <%
        set rs1=server.CreateObject("ADODB.Recordset")
        rs1.open "select * from Unit where UnitID",con,1,1
        %>
        <select name="select" onChange="(document.form11.Unit.value=this.options[this.selectedIndex].value)">
          <option>请选择单位</option>
          <%
         do while not rs1.eof
         %>
          <option value="<%=rs1("UnitName")%>"><%=rs1("UnitName")%></option>
          <%
        rs1.movenext
        loop
        %>
        </select>
      </label></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rs=server.CreateObject("ADODB.Recordset")
        rs.open "select * from FieldName where XH=5",con,1,1
        %>
          <input name="5" type="text" id="5" value="<%=rs("FieldName")%>" size="15" /></td>
      <%
      rs.close
      set rs=nothing
      %>
      <td bgcolor="#F3F3F3">市场价:
        <input name="Price" type="text" id="Price" size="7" />
        会员价:
        <input name="MemberPrice" type="text" id="MemberPrice" size="7" />
        VIP价:
        <input name="VIPPrice" type="text" id="VIPPrice" size="7" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=6",con,1,1
        %>
          <input name="6" type="text" id="6" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3">库存数:
        <input name="textfield22" type="text" id="textfield22" size="7" />
        已销售:
        <input name="textfield23" type="text" id="textfield23" size="7" />
        积 分:
        <input name="textfield24" type="text" id="textfield24" size="7" /></td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=7",con,1,1
        %>
          <input name="7" type="text" id="7" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
      %>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td height="29" align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3"><%set rss=server.CreateObject("ADODB.Recordset")
        rss.open "select * from FieldName where XH=8",con,1,1
        %>
          <input name="8" type="text" id="8" value="<%=rss("FieldName")%>" size="15" /></td>
      <%
      rss.close
      set rss=nothing
     ' End if
      %>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
    <tr>
      <td align="right" bgcolor="#F3F3F3">&nbsp;</td>
      <td bgcolor="#F3F3F3">&nbsp;</td>
    </tr>
<tr></tr>
</table>
</form>
</body>
</html>



搜索更多相关主题的帖子: content meta 
2010-04-08 21:14
zhuyunshen
Rank: 6Rank: 6
等 级:侠之大者
威 望:2
帖 子:212
专家分:455
注 册:2009-11-22
收藏
得分:7 
好多的代码
2010-04-08 22:02
a309223515
Rank: 2
等 级:论坛游民
帖 子:29
专家分:10
注 册:2010-4-8
收藏
得分:0 
回复 2楼 zhuyunshen
因为不知道是哪出了错,所以都贴上来了
2010-04-09 16:02
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:7 
显示不了是出错了(出现系统报错页面)?还是没出错显示不出来?
2010-04-09 16:18
a309223515
Rank: 2
等 级:论坛游民
帖 子:29
专家分:10
注 册:2010-4-8
收藏
得分:0 
回复 4楼 yms123
没报错,能运行,但只是第一行(一个三级连动菜单) 下面的就都没有了
不知道是哪出了错,望版主指教........
2010-04-09 22:31
快速回复:错错错错错错错!!!!!
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.019995 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved