asp代码中无法实现JS特效,问题在哪里?
asp代码中无法实现JS特效,问题在哪里?我是想把特效里的图片从数据库里调用,我的站点脚本程序都是VBSCRIPT的!请帮我下!我刚学做,请高手们说的详细点!谢了!
我把原代码给贴出来了!
我的修改后代码:
<!--#include file="conn.asp"-->
<%
set rs=conn.execute("select classid,title,content,picurl,writefrom,addtime,cplong,cpwidth,cphight,cpcolor,cpprice,tgprice,cpmaterial,cpclass,cpbianhao,cpstore,cpbrand,cpxilie,tpimage,tpimage1,tpimage2,tpimage3 from china where articleid="&request("id"))
if rs.eof and rs.bof then
response.redirect "index.asp"
response.end
else
dim classid
dim title,content,picurl,writefrom,addtime,cplong,cpwidth,cphight,cpcolor,cpprice,tgprice,cpmaterial,cpclass,cpbianhao,cpstore,cpbrand,cpxilie,tpimage,tpimage1,tpimage2,tpimage3
classid=rs(0)
title=rs(1)
content=rs(2)
picurl=rs(3)
writefrom=rs(4)
addtime=rs(5)
cplong=rs(6)
cpwidth=rs(7)
cphight=rs(8)
cpcolor=rs(19)
cpprice=rs(10)
tgprice=rs(11)
cpmaterial=rs(12)
cpclass=rs(13)
cpbianhao=rs(14)
cpstore=rs(15)
cpbrand=rs(16)
cpxilie=rs(17)
tpimage=rs(18)
tpimage1=rs(19)
tpimage2=rs(20)
tpimage3=rs(21)
end if
rs.close
if classid=20 then
classid=2
end if%>
<html>
<head>
<meta http-equiv="Content-Type" c>
<title>····@@@@@@@@@@@@@</title>
<LINK href="images/css.css" rel=stylesheet type=text/css>
<style type="text/css">
.spic a img{-moz-opacity:0.5; filter:alpha(opacity=50);border:0px;}
.spic a:hover{font-size:9px;}
.spic a:hover img{-moz-opacity:0.5; filter:alpha(opacity=100);cursor:hand;}
body {
background-image: url(images/pagebg1.gif);
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.STYLE1 {
color: #FF0000;
font-style: italic;
}
#Layer1 {
position:absolute;
width:304px;
height:24px;
z-index:1;
left: 85px;
top: 256px;
}
#Layer2 {
position:absolute;
width:618px;
height:21px;
z-index:2;
left: 136px;
top: 346px;
}
#Layer3 {
position:absolute;
width:200px;
height:25px;
z-index:2;
left: 304px;
top: 343px;
}
</style>
<script>
function seeBig(thispic) {
if(thispic==1){
document.all.viewPic.innerHTML='<%if trim(picurl)<>"" then response.write "<img src='"&picurl&"' width='700' hight='450' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='700' hight='450' border='0' align='center'>" end if%>'
}
if(thispic==2){
document.all.viewPic.innerHTML='<%if trim(tpimage)<>"" then response.write "<img src='"&tpimage&"' width='700' hight='450' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='700' hight='450' border='0' align='center'>" end if%>'
}
if(thispic==3){
document.all.viewPic.innerHTML='<%if trim(tpimage1)<>"" then response.write "<img src='"&tpimage1&"' width='700' hight='450' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='700' hight='450' border='0' align='center'>" end if%>'
}
if(thispic==4){
document.all.viewPic.innerHTML='<%if trim(tpimage2)<>"" then response.write "<img src='"&tpimage2&"' width='700' hight='450' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='700' hight='450' border='0' align='center'>" end if%>'
}
}
</script>
</head>
<body>
<table width="780" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#CACACA">
<tr>
<td bgcolor="#FFFFFF"><!--#include file="top.inc"-->
<table width="780" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="780" valign="top"><table width="780" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td align="center" width="575" colspan="2"><img src="images/shangpu5.gif" width="782" height="28">
<div id="Layer1"><span class="txt5">※<%=title%>--<%=cpclass%></span></div></td>
</tr>
</table>
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td colspan="4" align="center" id="viewPic"><%if trim(picurl)<>"" then response.write "<img src='"&picurl&"' width='700' hight='450' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='700' hight='450' border='0' align='center'>" end if%></td>
</tr>
<tr>
<td align="center"><span class="spic">
<a href="javascript:seeBig(1)" _fcksavedurl="javascript:seeBig(1)" style="cursor:pointer">
<%if trim(picurl)<>"" then response.write "<img src='"&picurl&"' width='180' hight='135' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='180' hight='135' border='0' align='center'>" end if%></a></span></td>
<td align="center"><span class="spic">
<a href="javascript:seeBig(1)" _fcksavedurl="javascript:seeBig(1)" style="cursor:pointer">
<%if trim(tpimage)<>"" then response.write "<img src='"&tpimage&"' width='180' hight='135' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='180' hight='135' border='0' align='center'>" end if%></a></span></td>
<td align="center"><span class="spic">
<a href="javascript:seeBig(1)" _fcksavedurl="javascript:seeBig(1)" style="cursor:pointer">
<%if trim(tpimage1)<>"" then response.write "<img src='"&tpimage1&"' width='180' hight='135' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='180' hight='135' border='0' align='center'>" end if%></a></span></td>
<td align="center"><span class="spic">
<a href="javascript:seeBig(1)" _fcksavedurl="javascript:seeBig(1)" style="cursor:pointer">
<%if trim(tpimage2)<>"" then response.write "<img src='"&tpimage2&"' width='180' hight='135' border='0' align='center'>" else response.write "<img src='images/noimg.jpg' width='180' hight='135' border='0' align='center'>" end if%></a></span></td>
</tr>
</table>
</td>
-----------------------------------------------------------------------
</tr>
</table>
</body>
</html>