⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 browse.asp

📁 javascript source code part2
💻 ASP
字号:
<!--#include file="ServerSideGlobalDef.inc"-->
<% Response.Expires = 0; %>
<HTML>
<%
      
	  // Retrive the data we included in the link
	  var scatTitle = Request.QueryString("Description");
	  var lCatId = Request.QueryString("CatId");
	  var lstartItemId = Request.QueryString("StartItemId");
	  
	  var sRowBGColor = "oldlace";
	  var savailable;
	  var lRecordCount = 0;
	  var loRS;
	  loRS = Server.CreateObject("ADODB.Recordset");
	  // S.ItemId, ArtistName, Title, YearReleased, Price, OfferPrice, OfferId, QtyInStock
      loRS.Open("Exec ListStockByCategory " + lCatId + "," + lstartItemId, sdbConnString);
%>
<BODY>
<H1 ALIGN="CENTER"><font face="Comic Sans MS" color="Navy"><%=scatTitle%></font></H1>
<div align="center">
<TABLE>
<% while (!(loRS.Eof))
        {
		
		// Alternate the row's background colour
		if (sRowBGColor == "ivory")
		{
			sRowBGColor = "oldlace";
		}
		else
		{
			sRowBGColor = "ivory";
		}
		
		lRecordCount++;
		
		// Create the Item availability sting
		if (loRS("QtyInStock") > 0)
		        {
				savailable = "In Stock";
				}
	   else
	            {
				 savailable = "<font color='#808080'>Unavailable</font>";
				}
				
		// ItemId;Qty;ArtistName;Title;Price;
		// determine what action clicking a product's add item link 
		// does.  If stock we want to add the item, if no stock or if cookies         
		// disabled then inform user
	if (savailable == "In Stock")
			{
					surlData = "AddToBasket.asp?ID" + escape(loRS("ItemId") + "&1&" + loRS("ArtistName") + "&" + loRS("Title") + "&" + loRS("Price") + "

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -