亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

商品詳情頁及價格總計

??? 2019-02-11 16:32:30 293
????:<div class="toubu"><div class="toubu_content mc"><div class="toubu_l l"><label>小米8</label><span></span><a href=""&g

<div class="toubu">

<div class="toubu_content mc">

<div class="toubu_l l">

<label>小米8</label><span></span>

<a href="">小米8 SE</a>

</div>

<div class="toubu_r r">

<a href="">概述</a><span></span>

<a href="">圖集</a><span></span>

<a href="">參數(shù)</a><span></span>

<a href="">F碼通道</a><span></span>

<a href="">用戶評價</a>

</div>

</div>

</div>


<div class="main_content mc">

<div class="main_content_l l" id="slideShowContainer">

<ul id="picUl">

<li><a href="#"><img src="img/lun/1.jpg" alt=""/></a></li>

</ul>

</div>

<div class="main_content_r r">

<div class="r1">

<h1>小米8</h1>

<p class="hui_s">12nm高性能處理器 / 5.45" 小巧全面屏 / 1300萬高清相機 / “小楊柳腰”機身</p>

<p class="r1_p">599</p>

</div>

<div class="r2">

<p class="mt20"><i class="layui-icon layui-icon-location"></i>北京 北京市 東城區(qū) 永定門外街道 <span>修改</span> </p>

<p style="color:#ff5700;">有現(xiàn)貨</p>

</div>

<div class="r3">

<h2>選擇版本</h2>

<p class="box_s">4GB+64GB 全網(wǎng)通 <span data-val="599">599元</span></p>

<p class="box_s">6GB+64GB 全網(wǎng)通 <span data-val="699">699元</span></p>

</div>

<div class="clear"></div>

<div class="r4">

<h2>選擇顏色</h2>

<p class="box_s">金色</p>

<p class="box_s">深灰</p>

<p class="box_s">亮紅</p>

<p class="box_s">亮藍</p>

</div>

<div class="clear"></div>

<div class="r5">              

<h2 style="float:left;">選擇小米提供的保障服務(wù)</h2>

<a class="r5a">了解保障服務(wù)

<i class="layui-icon layui-icon-right"></i></a>                

<div class="clear"></div>

<div class="box_m">

<div class="box_ml l">

<input type="checkbox">

<img src="img/bz.jpg">

</div>

<div class="box_mr l">

<h2>意外保障服務(wù)</h2>

<p class="hui_s">手機意外摔落/進水/碾壓等損壞</p>

<p><input type="checkbox">我已閱讀

<a href="">服務(wù)條款</a>|<a href="">服務(wù)條款</a>

<span data-val="99">99元</span>

</p>

</div>

</div>

<div class="box_m">

<div class="box_ml l">

<input type="checkbox">

<img src="img/bz.jpg">

</div>

<div class="box_mr l">

<h2>意外保障服務(wù)</h2>

<p class="hui_s">手機意外摔落/進水/碾壓等損壞</p>

<p><input type="checkbox">我已閱讀

<a href="">服務(wù)條款</a>|<a href="">服務(wù)條款</a>

<span data-val="179">179元</span>

</p>

</div>

</div>

</div>

<div class="clear"></div>

<div class="r6">

<p id="jx" style="font-size:14px;padding:30px 50px 10px;"></p>

<span id="dj"style="position:relative;left:-50px;top:-30px;">123</span>

<p id="jg" style="font-size:20px;color:#ff6700;padding:30px 50px;"></p>                

</div>

<button>加入購物車</button>

<p class="hui_s"> 7天無理由退貨  15天質(zhì)量問題換貨  365天保修</p>

</div>

</div>

頭部與主頁相同,不述。.css文件

.toubu{width:100%;height:60px;border:1px solid #e0e0e0;box-shadow:0 5px 10px 0 #eee;}

.toubu_content{height:60px;font-size:12px;color:#757575;text-align: center;line-height: 12px;padding:24px 0;}

.toubu_l label{font-weight: bold;color:black;float:left;}

.toubu span{width:0px;height:12px;border-right:2px solid #ccc;float:left;margin:0 7px;}

.toubu_content a:hover{color:#ff6700;}


.main_content{margin-top: 35px;}

.main_content_l{width:450px;height: 450px;}

.main_content_l img{width:450px;height: 450px;}

.main_content_r{width:600px;}

.main_content_r h2{padding:12px 0;}

.r1{width:600px;height:100px;border-bottom: 1px solid #e0e0e0;margin-bottom:40px;}

.r1_p{font-size:20px;color:#ff6700;margin:10px 0;}

.r2{width:600px;background-color:#fafafa;border: 1px solid #e0e0e0;}

.r2 p{padding:0 0 0 40px;}

.r2 span{color:#ff6700;}

.r2 span:hover{cursor:pointer;}

.r2{margin-bottom:20px;padding:35px 0;}

.r3{margin:18px 0;}

.r3 p{font-size:14px;float:left;}

.r3 span{font-size:14px;color:#ccc;float:right;}

.r4{margin:18px 0;}

.r4 p{font-size:14px;text-align: center;}

.r5{margin:18px 0;}

.r5a{float:right;color:#ff6700;position:relative;top:18px;}

.r5a:hover{cursor: pointer;}

.r6{width:600px;height:150px;background-color: #e0e0e0;margin:30px 0;}

.r6 span{font-size:14px;color:#656565;float:right;}

.box_s{width:252px;height:14px;padding:17px 20px;border: 1px solid #e0e0e0;float:left;margin-right:4px;margin-bottom:4px;}

.checked{border:1px solid #ff6700;}

.box_m{width:598px;height:150px;border: 1px solid #e0e0e0;}

.box_ml{width:150px;height:150px;line-height: 150px;text-align: center;}

.box_mr{width:400px;height:100px;line-height: 26px;padding-top:15px;}

.box_mr a{color:#ff6700;float:none;}

.box_mr span{font-size:14px;color:#ccc;float:right;}

.hui_s{font-size:12px;color:#ccc;}

h1,h2,h3{font-weight: 300px;}

.main_content_r button{font-size:20px;background-color:#ff6700;width:300px;height:50px;border:none;color:#fff;margin-bottom:20px;}


.main_foot{background:#f9f9fa;padding:35px 0 15px;font-size:25px;}

.main_foot img{padding:10px 0;}

.js文件

$(function(){

//    默認選中第一個版本/第一個顏色

$('.r3>p').eq(0).attr('class','box_s checked');

$('.r4>p').eq(0).attr('class','box_s checked');

updateTotalPrice()

//點擊選中其他的顏色

$('.r3>p').click(function(){

$('.r3>p').attr('class','box_s');

$(this).attr('class','box_s checked');

updateTotalPrice()

});

//點擊選中手機版本

$('.r4>p').click(function(){

$('.r4>p').attr('class','box_s');

$(this).attr('class','box_s checked');

updateTotalPrice();

})

//點擊保障服務(wù)

$('.box_m').click(function(){

if($(this).find('input[type=checkbox]')[0].checked){

$(this).find('input[type=checkbox]')[0].checked=false;

$(this).find('input[type=checkbox]')[1].checked=false;

}else{

$(this).find('input[type=checkbox]')[0].checked=true;

$(this).find('input[type=checkbox]')[1].checked=true;

}

updateTotalPrice();

})

//統(tǒng)計總價格

function updateTotalPrice(){

//版本價錢

var bb=$(".r3>p[class$='checked']").text().substr(0,9);

var bbprice=$(".r3>p[class$='checked']").find('span').attr('data-val')*1;

var cc=$(".r4>p[class$='checked']").text();

//服務(wù)價錢

var svprice=0;

var svspan=$(':checked').parent().find('span[data-val]');

for(var i=0;i<svspan.length;i++){

svprice+=svspan[i].getAttribute('data-val')*1;

}

//總價值

var totalprice=bbprice+svprice;

$('#jg').html('總計&nbsp;:&nbsp;'+totalprice+'元');

$('#dj').html(bbprice+'元');

$('#jx').html('小米8&nbsp'+bb+cc);

}

})

?? ???:韋小寶?? ??:2019-02-11 17:01:07
???? ??:下次記得把代碼復制完整點啊!不然這邊要訪問還要去找你之前的作業(yè)去拼接!

??? ??

?? ??