今天使用asp函数写的程序

<script language="javascript">
function linkto(url){
var url; window.open(url,'_blank','status=no,scrollbars=yes,resizable=1,top=0,left=0,width=800,height=600');
}
</script>
<table width="96%"  border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;
 <%
   catalogid=Request.QueryString("catalogid")
  set rs=server.CreateObject("adodb.recordset")
 rs.open "select * from t_business_catalog where CatalogID="&catalogid&"" ,conn,1,3
 if not rs.eof then
 response.Write(rs("CatalogName"))
 end if
 rs.close
 set rs=nothing
 %>

 </td>
  </tr>
    <tr>
    <td>&nbsp;</td>
  </tr>

</table>

<table width="96%"  border="0" cellpadding="0" cellspacing="1" bgcolor="#333333" align="center">
  <tr bgcolor="#CCCCCC" height="26" align="center" style="font-weight:bold">
    <td>Model </td>
    <td>Application </td>
    <td> Voice Coil<br>
      mm/Inch </td>
    <td> AES Power<br>
      Watts </td>
    <td>Sensitivity<br>
      dB/w/m </td>
    <td>Impedance<br>
      Ohm </td>
  </tr>
  <%
 set rs=server.CreateObject("adodb.recordset")
 rs.open "select * from t_business_type where CatalogID="&catalogid&" order by ID desc",conn,1,3
 if not rs.eof then
    do while not rs.eof
  %>
  <tr>
  <td colspan="6" bgcolor="#666666" height="26">&nbsp;&nbsp;<font color="#FFFFFF"><b><%=rs("TypeName")%></b></font></td>
  </tr> 
    <%
 ShowProductList(rs("Id"))
  rs.movenext
  loop
  end if
  rs.close
  set rs=nothing
  %>
</table>
<br>

<%
sub ShowProductList(type_id)
 set rs1=server.CreateObject("adodb.recordset")
 set rs1=server.CreateObject("adodb.recordset")
 rs1.open "select * from t_business_product where type_id="&type_id&" order by productid desc",conn,1,3
    do while not rs1.eof
%>
  <tr  height="26" align="left" bgcolor="#FFFFFF">
    <td>&nbsp;
 <a href="javascript:linkto('Product_detail.asp?Id=<%=rs1("productid")%>')">
 <%=rs1("Model")%>
  </a></td>
    <td>&nbsp;<%=rs1("Application")%> </td>
    <td>&nbsp; <%=rs1("VoiceCoil")%></td>
    <td>&nbsp;<%=rs1("PowerWatts")%></td>
    <td>&nbsp;<%=rs1("Sensitivity")%></td>
    <td>&nbsp;<%=rs1("ImpedanceOhm")%></td>
  </tr>
<%
rs1.movenext
loop
rs1.close
set rs1=nothing
end sub
%>

阅读更多

没有更多推荐了,返回首页