求帮修改代码。不知道如何设置购物车的加减方法,可以使加减不冲突
求帮修改代码。不知道怎么设置购物车的加减方法,可以使加减不冲突
<!doctype html>
<html>
<head>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<meta charset="UTF-8">
<title$amp;>amp;$lt;/title>
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"$amp;>amp;$nbsp;
<meta content="yes" name="apple-mobile-web-app-capable"$amp;>amp;$nbsp;
<meta content="black" name="apple-mobile-web-app-status-bar-style"$amp;>amp;$nbsp;
<meta content="telephone=no" name="format-detection"$amp;>amp;$nbsp;
<meta name="Description" content="生活更轻松">
<link rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css">
<script type="text/javascript" src="js/jquery.js"$amp;>amp;$lt;/script>
<script>
function selectall3()
{
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked =!a[i].checked;
}
</script>
<script>
$(function(){
var t = $("#textbox");
$("#add").click(function(){
t.val(parseInt(t.val())+1)
setTotal();
})
$("#min").click(function(){
t.val(parseInt(t.val())-1)
setTotal();
})
function setTotal(){
$("#total").html((parseInt(t.val())*3.95).toFixed(2));
}
setTotal();
})
</script>
</head>
<body>
<!--头部 开始-->
<section>
<div id="headerwd">
<div class="c-inav">
<section$amp;>amp;$lt;div class="btnbackl"$amp;>amp;$lt;a $amp;>amp;$lt;span$amp;>amp;$lt;/span$amp;>amp;$lt;/a$amp;>amp;$lt;/div$amp;>amp;$lt;/section>
<section$amp;>amp;$lt;span>订单确认</span$amp;>amp;$lt;/section>
<section id="navlist" class="navlist"$amp;>amp;$lt;img src="images/nav03.jpg" width="28" height="28"$amp;>amp;$lt;/section>
</div>
</div>
<div id="navboxwrap">
<!-- #include file="/include/mjianke/topnav.html" --$amp;>amp;$nbsp;
</div>
<script>
$(document).ready(function () {
$("#navlist").toggle(function () { $("#navbox").addClass("navboxshow"); }, function () { $("#navbox").removeClass("navboxshow"); },2000);
});
</script>
</section>
<div id="personal">
<div class="xg2">
<div class="shoppingchead underline2">
<span class="fl spancon spanleft marl20 ">共 <span class="red">2</span$amp;>amp;$amp;nbsp;件商品</span>
<a #" onclick="javascript:selectall3()" name=All$amp;>amp;$lt;div class="borradius alls fl border2 shadebg">全选</div$amp;>amp;$lt;/a>
</div>
<div class="mart15">
<div class="shoppinglist borradius border2 tal"$amp;>amp;$nbsp;
<div class="listl fl rel">
<div id="holder" class="cartdw">
<input type="checkbox" id="checkbox-2-2" class="regular-checkbox big-checkbox" /$amp;>amp;$lt;label for="checkbox-2-2"$amp;>amp;$lt;/label$amp;>amp;$lt;/div>
<a #"$amp;>amp;$lt;img src="images/waitpain03.gif" width="14" height="16" class="imgdeldw"$amp;>amp;$lt;/a>
</div>
<div class="listc fl borradius border2 rel"$amp;>amp;$lt;img src="images/waitpain07.jpg" width="35" height="52" class="imglistdw"$amp;>amp;$lt;/div>
<div class="listr fl fn12 rel">
<p>渔夫堡牌胶原蛋白维C粉<br />
规格:2.5g*20袋<br />
<span class="delline">市场价:¥1700</span$amp;>amp;$lt;br />
<span class="red">健客价:¥1700</span$amp;>amp;$lt;br /$amp;>amp;$lt;/p>
数量:
<div class="jjbtn">
<a javascript:void(0);" id="min"$amp;>amp;$lt;div class="fl cirbtn border2">-</div$amp;>amp;$lt;/a>
<input id="textbox" name="" type="text" value="1" class="fl jjtext"/>
<a #" id="add"$amp;>amp;$lt;div class="fl cirbtn border2">+</div$amp;>amp;$lt;/a>
</div$amp;>amp;$lt;/div>
<div class="clearfix"$amp;>amp;$lt;/div>
</div>
</div>
<div class="shoppinglist borradius border2 tal"$amp;>amp;$nbsp;
<div class="listl fl rel">
<div id="holder" class="cartdw"$amp;>amp;$lt;input type="checkbox" id="checkbox-2-1" class="regular-checkbox big-checkbox" /$amp;>amp;$lt;label for="checkbox-2-1"$amp;>amp;$lt;/label$amp;>amp;$lt;/div>
相关链接