帝国CMS购物车代码: <form action="[!----news.url--]e/ShopSys/doaction.php" name="shopform" method="get" target="_blank">
<div class="img_box_r_3_1">
<a href="javascript:pnUpdate('down')">-</a>
<input name="pn" id="pn" type="text" value="1" size="3"/>
<a href="javascript:pnUpdate('up')">+</a>
<b>[ [!----kc--] ]</b>
</div>
<input type="hidden" name="enews" value="AddBuycar">
<input type="hidden" name="classid" value="[!----classid--]">
<input type="hidden" name="id" value="[!----id--]">
<div class="img_box_r_3_2">
<input type="submit" name="submit" value="加入购物车">
<a href="[!----news.url--]e/member/fava/add/?classid=46&id=6" target="_blank">加入收藏夹</a>
</div>
</form> 帝国CMS购物车商品数量增加减少JS //产品详细页购买数量增加减少
function pnUpdate(kind){
var f = document.shopform;
var c = f.pn.value;
if(kind == "up"){
c++;
}else if(kind == "down"){
if(c > 1) c--;
}
f.pn.value = c;
}
CSS样式大家自行修改。
|