#12005/1/13 14:42:20
总是出现网页上有错误,如果不是从数据库里读数据或者是静态页面效果就可以出来
脚本出错提示:
行:149
字符:1
错误:'bar3'未定义
代码:0
url:http://www.bangbei.com/product.asp
代码如下:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--#include file="include/data.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta content="广州邦备机电设备有限公司">
<title>广州邦备机电设备有限公司</title>
<link href="style/css.css" rel="stylesheet" type="text/css">
<link href="style/css2.css" rel="stylesheet" type="text/css">
<link href="manage/css.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="062776" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
//下面是控制的脚本
<script language=javascript>
<!--
var old_menu = '';
var old_cell = '';
function menuclick( submenu ,cellbar)
{
if( old_menu != submenu ){
if( old_menu !='' ){
old_menu.style.display = 'none';
old_cell.src= 'images/04.gif';
}
submenu.style.display = 'block';
cellbar.src = 'images/04.gif';
old_menu = submenu;
old_cell = cellbar;
}else{
submenu.style.display = 'none';
cellbar.src= 'images/04.gif';
old_menu = '';
old_cell = '';
}
}
function RemoteWindow( url )
{
window.open( url, 'PreviewWin1','width=740,height=450,resizable=yes,scrollbars=yes,status=0,location=no')
}
function RemoteWindow2( url )
{
window.open( url, 'PreviewWin2','width=700,height=300,resizable=yes,scrollbars=yes,status=0,fullscreen=yes')
}
function RemoteWindow3( url )
{
window.open( url, 'sub','width=740,height=300,resizable=yes,scrollbars=yes,status=0,location=no')
}
function MM_preloadImages(){//v3.0
var d=document; if(d.images){if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d){//v3.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length){
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
}
function MM_nbGroup(event, grpName){//v3.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2){
if ((img = MM_findObj(args[2])) != null && !img.MM_init){
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null){
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
}}
}else if (event == "over"){
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null){
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : args[i+1];
nbArr[nbArr.length] = img;
}
}else if (event == "out" ){
for (i=0; i < document.MM_nbOver.length; i++){
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up;}
}else if (event == "down"){
if ((nbArr = document[grpName]) != null)
for (i=0; i < nbArr.length; i++){img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0;}
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null){
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
}}
}
//-->
</script>
<table width="781" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" bgcolor="#000033">
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="未命名" fwbase="s.jpg" fwstyle="Dreamweaver" fwdocid = "742308039" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="186" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="20" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="325" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="210" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="37" height="1" border="0" alt=""></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt=""></td>
</tr>
<tr>
<td colspan="5" background="images/s_r1_c1.jpg" bgcolor="#003366"><object
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
height=235 width=778 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
<param name="movie" value="media/ne.swf">
<param name="quality" value="high">
<param name="salign" value="RT">
<param name="wmode" value="transparent">
<embed src="media/ne.swf"
quality=high salign=RT wmode=transparent width=778 height=235
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed> </object></td>
<td><img src="images/spacer.gif" width="1" height="235" border="0" alt=""></td>
</tr>
<tr>
<td colspan="5"><img src="images/s_r2_c1.jpg" alt="" name="s_r2_c1" width="778" height="25" border="0" usemap="#s_r2_c1Map"></td>
<td><img src="images/spacer.gif" width="1" height="25" border="0" alt=""></td>
</tr>
<tr>
<td rowspan="8" valign="top" background="images/s_r5_c1.jpg" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img name="s_r3_c1" src="images/s_r3_c1.jpg" width="186" height="45" border="0" alt=""></td>
</tr>
</table></td>
</tr>
<tr>
<td>
//下面是要出效果的代码
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
set rs=conn.execute("SELECT * FROM categories order by idcategory")
do while not rs.eof
%><%if not Rs.eof then%><tr>
<td align="center" onclick="menuclick(submenu3,bar3 );"><img src="images/04.gif" id="bar3"> <font style='TEXT-DECORATION: underline'><%=Rs("categoryname")%></font>
<tr>
<td align="center" >
<%
set nrs=conn.execute("SELECT * FROM subcategories where idcategory="&cstr(rs("idcategory"))&"")
do while not nrs.eof
%>
<span id=submenu3 style=margin-left:5;display:none;> <img src="images/plus.gif"><a href="product_list.asp?idcategory=<%=nrs("idcategory")%>&idsubcategory=<%=nrs("idsubcategory")%>"><%=nRs("subcategoryname")%></a>::::</span><%
nrs.movenext
loop %></td>
</tr>
<%
rs.movenext
end if
loop
nrs.close
rs.close
%></table>
//上面是效果菜单
</td>
</tr>
<tr>
<td>
<table width="61%" height="18" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><object
codebase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
height=179 width=175 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
<param name="movie" value="media/clock51.swf">
<param name="quality" value="high">
<param name="salign" value="RT">
<param name="wmode" value="transparent">
<embed src="media/clock51.swf"
quality=high salign=RT wmode=transparent width=175 height=179
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</embed> </object></td>
</tr>
</table></td>
</tr>
</table>
</td>
<td colspan="4" rowspan="8" valign="top" bgcolor="#FFFFFF">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/chang.jpg" width="592" height="74"></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" valign="top"></td>
<td width="590" align="center" valign="top">
<%
set rs=conn.execute("SELECT * FROM categories order by idcategory")
%>
<%
do while not rs.eof
%> <table width="70%" border="0" cellpadding="3" cellspacing="2" bordercolor="#009999" class="table1">
<tr>
<td width="50%" height="24" valign=top bgcolor="#AAB5CC"><%if not Rs.eof then%>
<font class=b1><img src="images/04.gif"><a href="product_list.asp?idcategory=<%=rs("idcategory")%>"><%=Rs("categoryname")%></a></font></td>
</tr>
<tr>
<td height="54" valign=bottom bgcolor="#EFF1F0"><%
set nrs=conn.execute("SELECT top 3 * FROM products where idcategory="&cstr(rs("idcategory"))&" order by idproduct desc")
do while not nrs.eof
%>
<img src="images/roll_film.gif" width="11" height="11"><a href='viewproduct.asp?id=<%=nrs("idproduct")%>' title='<%=nrs("product_mc")%>' >
<%if len(nrs("product_mc"))>10 then%>
<%=left(nrs("product_mc"),10)%>.....
<%else%>
<%=nrs("product_mc")%>
<%end if%>
</a><font class=b2> </font> <br>
<%
nrs.movenext
loop
%>
<p align="right"><font style='TEXT-DECORATION: underline'><a href="product_list.asp?idcategory=<%=rs("idcategory")%>"><font style='TEXT-DECORATION: underline'>更多<%=rs("categoryname")%></font></a> </font></td>
</tr>
</table><br>
<%
Rs.movenext
end if%>
<%
loop
Rs.Close
set Rs=nothing
%></td>
<td align="center"> </td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table> </td>
<td><img src="images/spacer.gif" width="1" height="27" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="56" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="59" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="44" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="164" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="24" border="0" alt=""></td>
</tr>
<tr>
<td><img src="images/spacer.gif" width="1" height="18" border="0" alt=""></td>
</tr>
<tr>
<td colspan="2"><img name="s_r11_c1" src="images/s_r11_c1.jpg" width="206" height="58" border="0" alt=""></td>
<td colspan="3" valign="bottom" background="images/s_r11_c3.jpg" bgcolor="#FFFFFF">
<table width="63%" height="30" border="0" align="center" cellpadding="0" cellspacing="0" class="aaa">
<tr>
<td height="30" align="center"><span class="aa"><font color="#000000">版权所有:广州邦备机电设备有限公司 慧聪网网络技术公司</font></span></td>
</tr>
</table>
</td>
<td><img src="images/spacer.gif" width="1" height="58" border="0" alt=""></td>
</tr>
</table>
</td>
</tr>
</table>
<map name="s_r2_c1Map">
<area shape="rect" coords="258,1,332,28" href="index.asp">
<area shape="rect" coords="351,1,432,30" href="product.asp">
<area shape="rect" coords="439,2,514,32" href="gong.asp">
<area shape="rect" coords="530,2,610,33" href="contant.asp">
<area shape="rect" coords="632,1,709,29" href="index.asp">
</map>
</body>
</html>
编辑历史:[此帖最近一次被 地下铁 编辑过(编辑时间:2005-01-13 15:08:30)]