📄 productways.tag
字号:
<%-- 特价促销商品、店长推荐商品、最新上架商品 --%>
<%@ tag pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<div id="ProductImage">
<div id="ProductImageHead">
<div id="ProductImageTab0" class="PITabFirstActive" onclick="clearInterval(the_timeout);ProductImageOnClick(this,0)">特价促销</div>
<div id="ProductImageTab1" class="PITab" onclick="clearInterval(the_timeout);ProductImageOnClick(this,1)">店长推荐</div>
<div id="ProductImageTab2" class="PITabLast" onclick="clearInterval(the_timeout);ProductImageOnClick(this,2)">最新上架</div>
<div class="PIBlank"> </div>
</div>
<div id="ProductImageList">
<div style="display: block">
<!-- 特价促销商品 -->
<table id="ProductImageList2_dlProduct" cellspacing="0" align="Left"
border="0" style="border-collapse:collapse;">
<tr>
<c:choose>
<c:when test="${not empty requestScope.promotions}">
<c:forEach items="${requestScope.promotions}" var="product" varStatus="s">
<td style="width:140px;">
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' target="_blank" title="${product.name}"><img src="${product.image}" width="70" alt="${product.name}" title="${product.name}" /></a></td>
</tr>
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' title="${product.name}" target="_blank"> ${product.name} </a></td>
</tr>
<tr>
<td>促销价格:${product.price}</td>
</tr>
</table>
</td>
<c:if test="${s.index==4}"></tr><tr></c:if>
</c:forEach>
</c:when>
<c:otherwise><td>暂无特价促销商品!</td></c:otherwise>
</c:choose>
</tr>
</table>
</div>
<!-- 店长推荐商品 -->
<div style="display: none">
<table id="ProductImageList3_dlProduct" cellspacing="0" align="Left"
border="0" style="border-collapse:collapse;">
<tr>
<c:choose>
<c:when test="${not empty requestScope.recommends}">
<c:forEach items="${requestScope.recommends}" var="product" varStatus="s">
<td style="width:140px;">
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' target="_blank" title="${product.name}"><img src="${product.image}" width="70" alt="${product.name}" title="${product.name}" /></a></td>
</tr>
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' title="${product.name}" target="_blank"> ${product.name} </a></td>
</tr>
<tr>
<td>价格:${product.price}</td>
</tr>
</table>
</td>
<c:if test="${s.index==4}"></tr><tr></c:if>
</c:forEach>
</c:when>
<c:otherwise><td>暂无店长推荐商品!</td></c:otherwise>
</c:choose>
</tr>
</table>
</div>
<!-- 最新上架商品 -->
<div style="display: none">
<table id="ProductImageList1_dlProduct" cellspacing="0" align="Left"
border="0" style="border-collapse:collapse;">
<tr>
<c:choose>
<c:when test="${not empty requestScope.newproducts}">
<c:forEach items="${requestScope.newproducts}" var="product" varStatus="s">
<td style="width:140px;">
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' target="_blank" title="${product.name}"><img src="${product.image}" width="70" alt="${product.name}" title="${product.name}" /></a></td>
</tr>
<tr>
<td align="center"><a href='productinfo.htm?pid=${product.id}' title="${product.name}" target="_blank"> ${product.name} </a></td>
</tr>
<tr>
<td>价格:${product.price}</td>
</tr>
</table>
</td>
<c:if test="${s.index==4}"></tr><tr></c:if>
</c:forEach>
</c:when>
<c:otherwise><td>暂无最新上架商品!</td></c:otherwise>
</c:choose>
</tr>
</table>
</div>
</div>
</div>
<script language="javascript">
var curIndex=0;
//时间间隔 单位毫秒
var timeInterval=3000;
var the_timeout;
the_timeout = setInterval(changeTab,timeInterval);
function changeTab()
{
ProductImageOnClick(document.getElementById("ProductImageTab"+curIndex),curIndex);
curIndex+=1;
if(curIndex==3)
curIndex = 0;
}
</script>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -