我要在一个页面实现可以选择产品三个部分,选择是用javascript实现的而三种产品是用asp实现,但是不能真确执行,而在javascript中间加的是html的时候就正常着不知道问题在那里请高人指点,代码如下:
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<TABLE align=center border=0 cellPadding=3 cellSpacing=0
width="95%" class="tablelb">
<TBODY>
<TR>
<TD width="80%"> <SCRIPT language=javascript>
<!--//
function hid(num)
{document.all.hid_0.style.display='none';
document.all.hid_1.style.display='none';
document.all.hid_2.style.display='none';
eval("document.all.hid_"+num+".style.display='block'");
eval("document.all.Hcha["+num+"].checked=true");
}
//--></SCRIPT> <TABLE width="100%"
height=24 border=0 align=center cellPadding=0 cellspacing="0" gcellSpacing=0>
<TBODY>
<TR>
<TD align=middle bgColor=#f4f2f2 onclick=hid(0)
onmouseover="style.cursor='hand';" class="ltitle"><INPUT CHECKED
id=Hcha name=Hcha type=radio value=startpoint>
Basicss</TD>
<TD align=middle bgColor=#f4f2f2 onclick=hid(1)
onmouseover="style.cursor='hand';" class="ltitle"><INPUT id=Hcha
name=Hcha type=radio value=endpoint>
Add-Ons</TD>
<TD align=middle bgColor=#f4f2f2 onclick=hid(2)
onmouseover="style.cursor='hand';" class="ltitle"><INPUT id=Hcha
name=Hcha type=radio
value=travelbureauname>
Extra&Software</TD>
</TR>
</TBODY>
</TABLE>
<DIV id=hid_0 style="DISPLAY: block">
<%
'dim prename,company,intro,predate,graph2,description,remarks,price,rs2
set rs2=server.CreateObject("adodb.recordset")
'rs2.open "select * from product where id="&id,conn,1,3
rs2.open "select top 3 * from pjproduct where productid="&id,conn,1,3
'rs2("viewnum")=rs2("viewnum")+1
'rs2.update
if rs2.eof then
response.Write("There no Spare Part!")
response.End
else
do while not rs2.eof%>
<br>
<TABLE WIDTH="80%" height="175" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" class="tablelb">
<TR>
<TD height="15" bgcolor="#ADCBE9" ><strong><font color="#FF0000"><strong></strong></font></strong></TD>
<TD bgcolor="#ADCBE9" ><strong><font color="#FFFFFF"><strong><a href=bproduct.asp?id=<%=rs2("id")%>><%=trim(rs2("introduce"))%></a></strong></font></strong></TD>
<TD width="52%" colspan="2" bgcolor="#ADCBE9"> <div align="right"><img src="newpic/moreinfo_s.gif" width="15" height="15"><font color="#FFFFFF"><a href="bproduct.asp?id=<%=rs2("id")%>" target="_blank">More
Info</a></font></div></TD>
</TR>
<TR>
<TD colspan="2" rowspan="3" >
<%if trim(rs2("pic"))<>"" then %>
<table width="80" height="64" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr>
<td width="110" height="64" align="center" valign="middle" bgcolor="#FFFFFF"><a href=<%=trim(rs2("pic"))%> target=_blank><img src=<% = trim(rs2("pic")) %> border=0 width="80" height="52" alt=<% = trim(rs2("name")) %>></a></td>
</tr>
</table>
<% else %>
<img src=images/emptybook.jpg alt=此商品暂时没有图片 width="80" height="52">
<% end if %>
</TD>
<TD height="13" colspan="2"> <%=trim(rs2("name"))%> <input type="checkbox" name="xz" value="checkbox">
</TD>
</TR>
<TR>
<TD height="13" colspan="2"> </TD>
</TR>
<TR>
<TD height="81" colspan="2" valign="top"><%=rs2("introduce")%></TD>
</TR>
<TR>
<TD width="14%" height="18"><font color="#FF0000"> </font></TD>
<TD width="34%"><font color="#FF0000"><strong>$<%=rs2("price1")%>dollar </strong></font></TD>
<TD height="18"> </TD>
</TR>
</TABLE>
<br>
<%
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
%>
</DIV>
<!--*********************************************************************************"-->
<BR> <DIV id=hid_1 style="DISPLAY: none">
<DIV id=hid_0 style="DISPLAY: block">
<%
'dim prename,company,intro,predate,graph2,description,remarks,price,rs2
set rs2=server.CreateObject("adodb.recordset")
'rs2.open "select * from product where id="&id,conn,1,3
rs2.open "select top 3 * from sproduct where productid="&id,conn,1,3
'rs2("viewnum")=rs2("viewnum")+1
'rs2.update
if rs2.eof then
response.Write("There no Spare Part!")
response.End
else
do while not rs2.eof%>
<br>
<TABLE WIDTH="80%" height="175" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" class="tablelb">
<TR>
<TD height="15" bgcolor="#ADCBE9" ><strong><font color="#FF0000"><strong></strong></font></strong></TD>
<TD bgcolor="#ADCBE9" ><strong><font color="#FFFFFF"><strong><a href=bproduct.asp?id=<%=rs2("id")%>><%=trim(rs2("introduce"))%></a></strong></font></strong></TD>
<TD width="52%" colspan="2" bgcolor="#ADCBE9"> <div align="right"><img src="newpic/moreinfo_s.gif" width="15" height="15"><font color="#FFFFFF"><a href="bproduct.asp?id=<%=rs2("id")%>" target="_blank">More
Info</a></font></div></TD>
</TR>
<TR>
<TD colspan="2" rowspan="3" >
<%if trim(rs2("pic"))<>"" then %>
<table width="80" height="64" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr>
<td width="110" height="64" align="center" valign="middle" bgcolor="#FFFFFF"><a href=<%=trim(rs2("pic"))%> target=_blank><img src=<% = trim(rs2("pic")) %> border=0 width="80" height="52" alt=<% = trim(rs2("name")) %>></a></td>
</tr>
</table>
<% else %>
<img src=images/emptybook.jpg alt=此商品暂时没有图片 width="80" height="52">
<% end if %>
</TD>
<TD height="13" colspan="2"> <%=trim(rs2("name"))%> <input type="checkbox" name="xz2" value="checkbox">
</TD>
</TR>
<TR>
<TD height="13" colspan="2"> </TD>
</TR>
<TR>
<TD height="81" colspan="2" valign="top"><%=rs2("introduce")%></TD>
</TR>
<TR>
<TD width="14%" height="18"><font color="#FF0000"> </font></TD>
<TD width="34%"><font color="#FF0000"><strong>$<%=rs2("price1")%>dollar </strong></font></TD>
<TD height="18"> </TD>
</TR>
</TABLE>
<br>
<%
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
%>
</DIV>
</DIV>
<!--*********************************************************************************"-->
<SPAN
id=Page3 style="DISPLAY: none"> </SPAN> <SPAN
id=Page3 style="DISPLAY: none"> </SPAN> <DIV id=hid_0 style="DISPLAY: block">
<%
'dim prename,company,intro,predate,graph2,description,remarks,price,rs2
set rs2=server.CreateObject("adodb.recordset")
'rs2.open "select * from product where id="&id,conn,1,3
rs2.open "select top 3 * from eproduct where productid="&id,conn,1,3
'rs2("viewnum")=rs2("viewnum")+1
'rs2.update
if rs2.eof then
response.Write("There no Spare Part!")
response.End
else
do while not rs2.eof%>
<br>
<TABLE WIDTH="80%" height="175" BORDER="0" ALIGN="center" CELLPADDING="0" CELLSPACING="0" class="tablelb">
<TR>
<TD height="15" bgcolor="#ADCBE9" ><strong><font color="#FF0000"><strong></strong></font></strong></TD>
<TD bgcolor="#ADCBE9" ><strong><font color="#FFFFFF"><strong><a href=bproduct.asp?id=<%=rs2("id")%>><%=trim(rs2("introduce"))%></a></strong></font></strong></TD>
<TD width="52%" colspan="2" bgcolor="#ADCBE9"> <div align="right"><img src="newpic/moreinfo_s.gif" width="15" height="15"><font color="#FFFFFF"><a href="bproduct.asp?id=<%=rs2("id")%>" target="_blank">More
Info</a></font></div></TD>
</TR>
<TR>
<TD colspan="2" rowspan="3" >
<%if trim(rs2("pic"))<>"" then %>
<table width="80" height="64" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#999999">
<tr>
<td width="110" height="64" align="center" valign="middle" bgcolor="#FFFFFF"><a href=<%=trim(rs2("pic"))%> target=_blank><img src=<% = trim(rs2("pic")) %> border=0 width="80" height="52" alt=<% = trim(rs2("name")) %>></a></td>
</tr>
</table>
<% else %>
<img src=images/emptybook.jpg alt=此商品暂时没有图片 width="80" height="52">
<% end if %>
</TD>
<TD height="13" colspan="2"> <%=trim(rs2("name"))%> <input type="checkbox" name="xz3" value="checkbox">
</TD>
</TR>
<TR>
<TD height="13" colspan="2"> </TD>
</TR>
<TR>
<TD height="81" colspan="2" valign="top"><%=rs2("introduce")%></TD>
</TR>
<TR>
<TD width="14%" height="18"><font color="#FF0000"> </font></TD>
<TD width="34%"><font color="#FF0000"><strong>$<%=rs2("price1")%>dollar </strong></font></TD>
<TD height="18"> </TD>
</TR>
</TABLE>
<br>
<%
rs2.movenext
loop
end if
rs2.close
set rs2=nothing
%>
</DIV>
<DIV id=hid_2 style="DISPLAY: none"></DIV></TD>
</TR>
</TBODY>
</TABLE>
</body>
</html>