|
15分9秒
本视频采用html5方式播放,如无法正常播放,请将浏览器升级至最新版本,推荐火狐,chrome,360浏览器
如果装有迅雷,播放视频呈现直接下载状态,请调整 迅雷系统设置-基本设置-启动-监视全部浏览器 (去掉这个选项)
步骤
1
:
显示缩略图效果
步骤
2
:
显示缩略图效果js代码讲解
步骤
3
:
修改价格效果
步骤
4
:
修改价格js代码讲解
步骤
5
:
切换商品详情和累计评价效果
步骤
6
:
切换商品详情和累计评价js代码讲解
当鼠标悬停在小图片上的时候,大图片就显示这个当前图片。
");
window.frames["iframe_show3256"].document.write(decodeHtml($("textarea#stepcodeTextarea3256").val()));
window.frames["iframe_show3256"].document.close();
$(window.frames["iframe_show3256"]).load(function(){
$("#iframe_show3256").height($("#iframe_show3256").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3256").height($("#iframe_show3256").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
$("img.smallImage").mouseenter(function(){
var bigImageURL = $(this).attr("bigImageURL");
$("img.bigImg").attr("src",bigImageURL);
});
$("img.bigImg").load(
function(){
$("img.smallImage").each(function(){
var bigImageURL = $(this).attr("bigImageURL");
img = new Image();
img.src = bigImageURL;
img.onload = function(){
console.log(bigImageURL);
$("div.img4load").append($(img));
};
});
}
);
});
</script>
<style>
div.imgAndInfo{
margin: 40px 20px;
}
div.imgInimgAndInfo{
width: 400px;
float: left;
}
div.imgAndInfo img.bigImg{
width: 400px;
height: 400px;
padding: 20px;
border: 1px solid #F2F2F2;
}
div.imgAndInfo div.smallImageDiv{
width: 80%;
margin: 20px auto;
}
div.imgAndInfo img.smallImage{
width: 60px;
height: 60px;
border: 2px solid white;
}
div.imgAndInfo img.smallImage:hover{
border: 2px solid black;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img width="100px" class="bigImg" src="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
<div class="smallImageDiv">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8620.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8620.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8619.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8618.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8618.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8617.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8617.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8616.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8616.jpg">
</div>
<div class="img4load hidden" ></div>
</div>
<div style="clear:both"></div>
</div>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
$("img.smallImage").mouseenter(function(){
var bigImageURL = $(this).attr("bigImageURL");
$("img.bigImg").attr("src",bigImageURL);
});
$("img.bigImg").load(
function(){
$("img.smallImage").each(function(){
var bigImageURL = $(this).attr("bigImageURL");
img = new Image();
img.src = bigImageURL;
img.onload = function(){
console.log(bigImageURL);
$("div.img4load").append($(img));
};
});
}
);
});
</script>
<style>
div.imgAndInfo{
margin: 40px 20px;
}
div.imgInimgAndInfo{
width: 400px;
float: left;
}
div.imgAndInfo img.bigImg{
width: 400px;
height: 400px;
padding: 20px;
border: 1px solid #F2F2F2;
}
div.imgAndInfo div.smallImageDiv{
width: 80%;
margin: 20px auto;
}
div.imgAndInfo img.smallImage{
width: 60px;
height: 60px;
border: 2px solid white;
}
div.imgAndInfo img.smallImage:hover{
border: 2px solid black;
}
</style>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img width="100px" class="bigImg" src="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
<div class="smallImageDiv">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8620.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8620.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8619.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8618.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8618.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8617.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8617.jpg">
<img width="100px" class="smallImage" src="http://127.0.0.1/tmall/img/productSingle_small/8616.jpg" bigImageURL="http://127.0.0.1/tmall/img/productSingle/8616.jpg">
</div>
<div class="img4load hidden" ></div>
</div>
<div style="clear:both"></div>
</div>
");
window.frames["iframe3256"].document.write(decodeHtml(code3256));
window.frames["iframe3256"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3256"]).load(function(){
$("#iframe3256").height($("#iframe3256").contents().find("body").height()+showittryitheight);
});
$("#iframe3256").height($("#iframe3256").contents().find("body").height()+showittryitheight);
alreadyWriteCode3256 = code3256;
$("#rendering3256").hide();
$("#rendered3256").show();
}
var tRereshRetry2DemoPanel3256 = setInterval(rereshRetry2DemoPanel3256,1000);
var binded3256 = false;
$("textarea#stepcodeTextarea3256").keyup(function(){
if(!binded3256){
$(window).bind('beforeunload',function(){
binded3256 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3256 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3256!=newCode){
// window.frames["iframe3256"].document.write("
");
// window.frames["iframe3256"].document.write(decodeHtml($("textarea#stepcodeTextarea3256").val()));
// window.frames["iframe3256"].document.close();
// $(window.frames["iframe3256"]).load(function(){
// $("#iframe3256").height($("#iframe3256").contents().find("body").height()+showittryitheight);
// });
// code3256 = newCode;
// }
});
$(".tryButton3256").click(function(){
$("#tryDiv3256").show();
$("#stepcodeTextarea3256").focus();
$("#stepcodeTextarea3256").height(200);
$("#iframe3256").height(0);
window.frames["iframe3256"].document.write("
");
window.frames["iframe3256"].document.write(decodeHtml($("textarea#stepcodeTextarea3256").val()));
window.frames["iframe3256"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3256"]).load(function(){
$("#iframe3256").height($("#iframe3256").contents().find("body").height()+showittryitheight);
});
$("#iframe3256").height($("#iframe3256").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3256.focus();
editor3256.setSize(null, "250");
$("#rendering3256").hide();
$("#rendered3256").hide();
});
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor3256 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3256"), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
mode:"text/html",
theme:"eclipse",
selectionPointer: true,
lineWrapping: true,
extraKeys: {
"Alt-/": "autocomplete",
"Ctrl-F": "findPersistent",
"F8": function(cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
},
"Esc": function(cm) {
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}
}
});
editor3256.on("change",function(doc){
if(!binded3256){
$(window).bind('beforeunload',function(){
binded3256 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3256 = newCode;
$("textarea#stepcodeTextarea3256").val(newCode);
if(alreadyWriteCode3256!=code3256){
lastModifedTime3256 = new Date().getTime();
$("#rendering3256").show();
$("#rendered3256").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3256 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3256.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3256").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
增值内容,请先登录
可以向上调整数量,但是不能超过最大库存 可以向下调整数量,但是不能小于1 输入任何非数字,都会恢复为原来数字 输入的数字超过库存,恢复为最大库存
");
window.frames["iframe_show3258"].document.write(decodeHtml($("textarea#stepcodeTextarea3258").val()));
window.frames["iframe_show3258"].document.close();
$(window.frames["iframe_show3258"]).load(function(){
$("#iframe_show3258").height($("#iframe_show3258").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3258").height($("#iframe_show3258").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
var stock = 66;
$(".productNumberSetting").keyup(function(){
var num= $(".productNumberSetting").val();
num = parseInt(num);
if(isNaN(num))
num= 1;
if(num<=0)
num = 1;
if(num>stock)
num = stock;
$(".productNumberSetting").val(num);
});
$(".increaseNumber").click(function(){
var num= $(".productNumberSetting").val();
num++;
if(num>stock)
num = stock;
$(".productNumberSetting").val(num);
});
$(".decreaseNumber").click(function(){
var num= $(".productNumberSetting").val();
--num;
if(num<=0)
num=1;
$(".productNumberSetting").val(num);
});
});
</script>
<style>
body{
font-size: 12px;
font-family: Arial;
}
div.imgAndInfo{
margin: 40px 20px;
}
div.imgInimgAndInfo{
width: 100px;
float: left;
}
div.infoInimgAndInfo{
padding: 0px 20px;
overflow: hidden;
}
div.infoInimgAndInfo div.productTitle{
color: black;
font-size: 16px;
font-weight: bold;
margin: 0px 10px;
}
div.infoInimgAndInfo div.productSubTitle{
color: #DD2727;
font-size: 12px;
margin: 0px 10px;
}
div.infoInimgAndInfo div.juhuasuan{
background-color: #2DA77A;
color: white;
text-align: center;
line-height: 40px;
margin-top: 10px;
}
div.infoInimgAndInfo span.juhuasuanBig{
font-size: 18px;
font-weight: bold;
font-family: 黑体;
}
div.infoInimgAndInfo span.juhuasuanTime{
color: #FFC057;
font-weight: bold;
}
div.infoInimgAndInfo div.productPriceDiv{
background-image:url(http://127.0.0.1/tmall../../../img/site/priceBackground.png);
height: 102px;
padding: 10px;
color: #666666;
}
div.infoInimgAndInfo div.gouwujuanDiv{
margin-top: 5px;
}
div.infoInimgAndInfo div.originalDiv{
margin-top: 5px;
}
div.infoInimgAndInfo span.originalPriceDesc{
color: #999999;
display: inline-block;
width: 68px;
}
div.infoInimgAndInfo span.originalPrice{
font-family: Arial;
font-size: 12px;
color: #333333;
text-decoration: line-through;
}
div.infoInimgAndInfo span.promotionPriceYuan{
font-family: Arial;
font-size: 18px;
color: #C40000;
}
div.infoInimgAndInfo span.promotionPrice{
color: #c40000;
font-family: Arial;
font-size: 30px;
font-weight: bold;
}
div.infoInimgAndInfo span.promotionPriceDesc{
color: #999999;
display: inline-block;
width: 68px;
position: relative;
left: 0px;
top: -10px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber{
margin: 20px 0px;
border-top-style: dotted;
border-top-color: #C9C9C9;
border-top-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #C9C9C9;
border-bottom-width: 1px;
padding: 10px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber div{
display: inline-block;
width: 49%;
text-align: center;
color: #999999;
font-size: 12px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber div:first-child{
border-right-width: 1px;
border-right-style: solid;
border-right-color: #E5DFDA;
}
div.infoInimgAndInfo div.productNumber{
color: #999999;
}
div.infoInimgAndInfo span.productNumberSettingSpan{
border: 1px solid #999;
display: inline-block;
width: 43px;
height: 32px;
padding-top:7px;
}
div.infoInimgAndInfo input.productNumberSetting{
border: 0px;
height: 80%;
width: 80%;
}
div.productNumber span.updown img{
display:inline-block;
vertical-align:top;
}
div.productNumber span.updown{
border: 1px solid #999;
display: block;
width: 20px;
height: 14px;
text-align: center;
padding-top:4px;
}
div.productNumber span.updownMiddle{
height: 4px;
display: block;
}
div.productNumber span.arrow{
display: inline-block;
width: 22px;
height: 32px;
vertical-align:top;
}
div.serviceCommitment{
margin: 20px 0px;
}
div.infoInimgAndInfo span.serviceCommitmentDesc{
color: #999999;
}
div.infoInimgAndInfo span.serviceCommitmentLink a{
color: #666666;
}
div.buyDiv{
margin: 20px auto;
text-align: center;
}
div.buyDiv button{
display: inline-block;
margin: 0px 10px;
width: 180px;
height: 40px;
}
button.buyButton{
border: 1px solid #C40000;
background-color: #FFEDED;
text-align: center;
line-height: 40px;
font-size: 16px;
color: #C40000;
font-family: arial;
}
button.addCartButton{
border: 1px solid #C40000;
background-color: #C40000;
text-align: center;
line-height: 40px;
font-size: 16px;
color: white;
font-family: arial;
}
button.addCartButton span.glyphicon{
font-size: 12px;
margin-right: 8px;
}
a:hover{
text-decoration:none;
}
.redColor{
color: #C40000;
}
.boldWord{
font-weight: bold;
}
</style>
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img width="100px" src="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
</div>
<div class="infoInimgAndInfo">
<div class="productTitle">
名媛2016新款女装夏两件套裤韩版雪纺七分裤阔腿裤休闲时尚套装女
</div>
<div class="productSubTitle">
高端定制 高档棉麻 现货即发 加购物车 领优惠卷
</div>
<div class="productPrice">
<div class="juhuasuan">
<span class="juhuasuanBig">聚划算</span>
<span>此商品即将参加聚划算,<span class="juhuasuanTime">1天19小时</span>后开始,</span>
</div>
<div class="productPriceDiv">
<div class="gouwujuanDiv"><img height="16px" src="http://127.0.0.1/tmall../../../img/site/gouwujuan.png">
<span> 全天猫实物商品通用</span>
</div>
<div class="originalDiv">
<span class="originalPriceDesc">价格</span>
<span class="originalPriceYuan">¥</span>
<span class="originalPrice">
399.00
</span>
</div>
<div class="promotionDiv">
<span class="promotionPriceDesc">促销价 </span>
<span class="promotionPriceYuan">¥</span>
<span class="promotionPrice">
379.05
</span>
</div>
</div>
</div>
<div class="productSaleAndReviewNumber">
<div>销量 <span class="redColor boldWord"> 50</span></div>
<div>累计评价 <span class="redColor boldWord"> 19</span></div>
</div>
<div class="productNumber">
<span>数量</span>
<span>
<span class="productNumberSettingSpan">
<input type="text" value="1" class="productNumberSetting">
</span>
<span class="arrow">
<a class="increaseNumber" href="#nowhere">
<span class="updown">
<img src="http://127.0.0.1/tmall../../../img/site/increase.png">
</span>
</a>
<span class="updownMiddle"> </span>
<a class="decreaseNumber" href="#nowhere">
<span class="updown">
<img src="http://127.0.0.1/tmall../../../img/site/decrease.png">
</span>
</a>
</span>
件</span>
<span>库存66件</span>
</div>
<div class="serviceCommitment">
<span class="serviceCommitmentDesc">服务承诺</span>
<span class="serviceCommitmentLink">
<a href="#nowhere">正品保证</a>
<a href="#nowhere">极速退款</a>
<a href="#nowhere">赠运费险</a>
<a href="#nowhere">七天无理由退换</a>
</span>
</div>
<div class="buyDiv">
<a href="#nowhere" class="buyLink"><button class="buyButton">立即购买</button></a>
<a class="addCartLink" href="#nowhere"><button class="addCartButton"><span class="glyphicon glyphicon-shopping-cart"></span>加入购物车</button></a>
</div>
</div>
<div style="clear:both"></div>
</div>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
var stock = 66;
$(".productNumberSetting").keyup(function(){
var num= $(".productNumberSetting").val();
num = parseInt(num);
if(isNaN(num))
num= 1;
if(num<=0)
num = 1;
if(num>stock)
num = stock;
$(".productNumberSetting").val(num);
});
$(".increaseNumber").click(function(){
var num= $(".productNumberSetting").val();
num++;
if(num>stock)
num = stock;
$(".productNumberSetting").val(num);
});
$(".decreaseNumber").click(function(){
var num= $(".productNumberSetting").val();
--num;
if(num<=0)
num=1;
$(".productNumberSetting").val(num);
});
});
</script>
<style>
body{
font-size: 12px;
font-family: Arial;
}
div.imgAndInfo{
margin: 40px 20px;
}
div.imgInimgAndInfo{
width: 100px;
float: left;
}
div.infoInimgAndInfo{
padding: 0px 20px;
overflow: hidden;
}
div.infoInimgAndInfo div.productTitle{
color: black;
font-size: 16px;
font-weight: bold;
margin: 0px 10px;
}
div.infoInimgAndInfo div.productSubTitle{
color: #DD2727;
font-size: 12px;
margin: 0px 10px;
}
div.infoInimgAndInfo div.juhuasuan{
background-color: #2DA77A;
color: white;
text-align: center;
line-height: 40px;
margin-top: 10px;
}
div.infoInimgAndInfo span.juhuasuanBig{
font-size: 18px;
font-weight: bold;
font-family: 黑体;
}
div.infoInimgAndInfo span.juhuasuanTime{
color: #FFC057;
font-weight: bold;
}
div.infoInimgAndInfo div.productPriceDiv{
background-image:url(http://127.0.0.1/tmall../../../img/site/priceBackground.png);
height: 102px;
padding: 10px;
color: #666666;
}
div.infoInimgAndInfo div.gouwujuanDiv{
margin-top: 5px;
}
div.infoInimgAndInfo div.originalDiv{
margin-top: 5px;
}
div.infoInimgAndInfo span.originalPriceDesc{
color: #999999;
display: inline-block;
width: 68px;
}
div.infoInimgAndInfo span.originalPrice{
font-family: Arial;
font-size: 12px;
color: #333333;
text-decoration: line-through;
}
div.infoInimgAndInfo span.promotionPriceYuan{
font-family: Arial;
font-size: 18px;
color: #C40000;
}
div.infoInimgAndInfo span.promotionPrice{
color: #c40000;
font-family: Arial;
font-size: 30px;
font-weight: bold;
}
div.infoInimgAndInfo span.promotionPriceDesc{
color: #999999;
display: inline-block;
width: 68px;
position: relative;
left: 0px;
top: -10px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber{
margin: 20px 0px;
border-top-style: dotted;
border-top-color: #C9C9C9;
border-top-width: 1px;
border-bottom-style: dotted;
border-bottom-color: #C9C9C9;
border-bottom-width: 1px;
padding: 10px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber div{
display: inline-block;
width: 49%;
text-align: center;
color: #999999;
font-size: 12px;
}
div.infoInimgAndInfo div.productSaleAndReviewNumber div:first-child{
border-right-width: 1px;
border-right-style: solid;
border-right-color: #E5DFDA;
}
div.infoInimgAndInfo div.productNumber{
color: #999999;
}
div.infoInimgAndInfo span.productNumberSettingSpan{
border: 1px solid #999;
display: inline-block;
width: 43px;
height: 32px;
padding-top:7px;
}
div.infoInimgAndInfo input.productNumberSetting{
border: 0px;
height: 80%;
width: 80%;
}
div.productNumber span.updown img{
display:inline-block;
vertical-align:top;
}
div.productNumber span.updown{
border: 1px solid #999;
display: block;
width: 20px;
height: 14px;
text-align: center;
padding-top:4px;
}
div.productNumber span.updownMiddle{
height: 4px;
display: block;
}
div.productNumber span.arrow{
display: inline-block;
width: 22px;
height: 32px;
vertical-align:top;
}
div.serviceCommitment{
margin: 20px 0px;
}
div.infoInimgAndInfo span.serviceCommitmentDesc{
color: #999999;
}
div.infoInimgAndInfo span.serviceCommitmentLink a{
color: #666666;
}
div.buyDiv{
margin: 20px auto;
text-align: center;
}
div.buyDiv button{
display: inline-block;
margin: 0px 10px;
width: 180px;
height: 40px;
}
button.buyButton{
border: 1px solid #C40000;
background-color: #FFEDED;
text-align: center;
line-height: 40px;
font-size: 16px;
color: #C40000;
font-family: arial;
}
button.addCartButton{
border: 1px solid #C40000;
background-color: #C40000;
text-align: center;
line-height: 40px;
font-size: 16px;
color: white;
font-family: arial;
}
button.addCartButton span.glyphicon{
font-size: 12px;
margin-right: 8px;
}
a:hover{
text-decoration:none;
}
.redColor{
color: #C40000;
}
.boldWord{
font-weight: bold;
}
</style>
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img width="100px" src="http://127.0.0.1/tmall/img/productSingle/8619.jpg">
</div>
<div class="infoInimgAndInfo">
<div class="productTitle">
名媛2016新款女装夏两件套裤韩版雪纺七分裤阔腿裤休闲时尚套装女
</div>
<div class="productSubTitle">
高端定制 高档棉麻 现货即发 加购物车 领优惠卷
</div>
<div class="productPrice">
<div class="juhuasuan">
<span class="juhuasuanBig">聚划算</span>
<span>此商品即将参加聚划算,<span class="juhuasuanTime">1天19小时</span>后开始,</span>
</div>
<div class="productPriceDiv">
<div class="gouwujuanDiv"><img height="16px" src="http://127.0.0.1/tmall../../../img/site/gouwujuan.png">
<span> 全天猫实物商品通用</span>
</div>
<div class="originalDiv">
<span class="originalPriceDesc">价格</span>
<span class="originalPriceYuan">¥</span>
<span class="originalPrice">
399.00
</span>
</div>
<div class="promotionDiv">
<span class="promotionPriceDesc">促销价 </span>
<span class="promotionPriceYuan">¥</span>
<span class="promotionPrice">
379.05
</span>
</div>
</div>
</div>
<div class="productSaleAndReviewNumber">
<div>销量 <span class="redColor boldWord"> 50</span></div>
<div>累计评价 <span class="redColor boldWord"> 19</span></div>
</div>
<div class="productNumber">
<span>数量</span>
<span>
<span class="productNumberSettingSpan">
<input type="text" value="1" class="productNumberSetting">
</span>
<span class="arrow">
<a class="increaseNumber" href="#nowhere">
<span class="updown">
<img src="http://127.0.0.1/tmall../../../img/site/increase.png">
</span>
</a>
<span class="updownMiddle"> </span>
<a class="decreaseNumber" href="#nowhere">
<span class="updown">
<img src="http://127.0.0.1/tmall../../../img/site/decrease.png">
</span>
</a>
</span>
件</span>
<span>库存66件</span>
</div>
<div class="serviceCommitment">
<span class="serviceCommitmentDesc">服务承诺</span>
<span class="serviceCommitmentLink">
<a href="#nowhere">正品保证</a>
<a href="#nowhere">极速退款</a>
<a href="#nowhere">赠运费险</a>
<a href="#nowhere">七天无理由退换</a>
</span>
</div>
<div class="buyDiv">
<a href="#nowhere" class="buyLink"><button class="buyButton">立即购买</button></a>
<a class="addCartLink" href="#nowhere"><button class="addCartButton"><span class="glyphicon glyphicon-shopping-cart"></span>加入购物车</button></a>
</div>
</div>
<div style="clear:both"></div>
</div>
");
window.frames["iframe3258"].document.write(decodeHtml(code3258));
window.frames["iframe3258"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3258"]).load(function(){
$("#iframe3258").height($("#iframe3258").contents().find("body").height()+showittryitheight);
});
$("#iframe3258").height($("#iframe3258").contents().find("body").height()+showittryitheight);
alreadyWriteCode3258 = code3258;
$("#rendering3258").hide();
$("#rendered3258").show();
}
var tRereshRetry2DemoPanel3258 = setInterval(rereshRetry2DemoPanel3258,1000);
var binded3258 = false;
$("textarea#stepcodeTextarea3258").keyup(function(){
if(!binded3258){
$(window).bind('beforeunload',function(){
binded3258 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3258 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3258!=newCode){
// window.frames["iframe3258"].document.write("
");
// window.frames["iframe3258"].document.write(decodeHtml($("textarea#stepcodeTextarea3258").val()));
// window.frames["iframe3258"].document.close();
// $(window.frames["iframe3258"]).load(function(){
// $("#iframe3258").height($("#iframe3258").contents().find("body").height()+showittryitheight);
// });
// code3258 = newCode;
// }
});
$(".tryButton3258").click(function(){
$("#tryDiv3258").show();
$("#stepcodeTextarea3258").focus();
$("#stepcodeTextarea3258").height(200);
$("#iframe3258").height(0);
window.frames["iframe3258"].document.write("
");
window.frames["iframe3258"].document.write(decodeHtml($("textarea#stepcodeTextarea3258").val()));
window.frames["iframe3258"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3258"]).load(function(){
$("#iframe3258").height($("#iframe3258").contents().find("body").height()+showittryitheight);
});
$("#iframe3258").height($("#iframe3258").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3258.focus();
editor3258.setSize(null, "250");
$("#rendering3258").hide();
$("#rendered3258").hide();
});
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor3258 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3258"), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
mode:"text/html",
theme:"eclipse",
selectionPointer: true,
lineWrapping: true,
extraKeys: {
"Alt-/": "autocomplete",
"Ctrl-F": "findPersistent",
"F8": function(cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
},
"Esc": function(cm) {
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}
}
});
editor3258.on("change",function(doc){
if(!binded3258){
$(window).bind('beforeunload',function(){
binded3258 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3258 = newCode;
$("textarea#stepcodeTextarea3258").val(newCode);
if(alreadyWriteCode3258!=code3258){
lastModifedTime3258 = new Date().getTime();
$("#rendering3258").show();
$("#rendered3258").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3258 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3258.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3258").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
增值内容,请先登录
");
window.frames["iframe_show3260"].document.write(decodeHtml($("textarea#stepcodeTextarea3260").val()));
window.frames["iframe_show3260"].document.close();
$(window.frames["iframe_show3260"]).load(function(){
$("#iframe_show3260").height($("#iframe_show3260").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3260").height($("#iframe_show3260").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
$("div.productReviewDiv").hide();
$("a.productDetailTopReviewLink").click(function(){
$("div.productReviewDiv").show();
$("div.productDetailDiv").hide();
});
$("a.productReviewTopPartSelectedLink").click(function(){
$("div.productReviewDiv").hide();
$("div.productDetailDiv").show();
});
})
</script>
<style>
div.productDetailDiv{
width: 790px;
margin: 40px auto;
}
div.productDetailTopPart{
border: 1px solid #DFDFDF;
border-left-width: 0px;
}
a.selected{
border-left: 1px solid #cfbfb1;
border-right: 1px solid #cfbfb1;
color: #b10000;
display: inline-block;
font-weight: bold;
line-height: 46px;
width: 90px;
text-align: center;
position: relative;
}
a.selected:before{
border-color: #b00000;
border-style: solid;
border-width: 1px;
content: "";
display: block;
width: 90px;
height: 0;
position: absolute;
top: -1px;
margin-left: -1px;
}
a.selected:after{
border-color: #b00000 transparent transparent;
border-style: solid;
border-width: 5px;
content: "";
display: block;
width: 0;
height: 0;
position: absolute;
top: -1px;
left: 50%;
margin-left: -5px;
}
a.productDetailTopReviewLink{
padding: 0px 20px;
border-right: 1px dotted #D2D2D2;
color: #333333;
}
div.productReviewDiv{
width: 790px;
margin: 40px auto;
}
div.productReviewTopPart{
border: 1px solid #DFDFDF;
}
a.productReviewTopPartSelectedLink{
padding: 0px 20px;
color: #333333;
}
span.productDetailTopReviewLinkNumber{
color: #3355B9;
}
div.productParamterPart{
border: 1px solid #DFDFDF;
padding: 40px;
}
div.productParamter{
color: #999999;
font-weight: bold;
margin-bottom: 20px;
}
div.productParamterList span{
display: block;
width: 220px;
float: left;
padding: 8px 0px;
color: #666666;
}
div.productDetailImagesPart img{
display: block;
width: 790px;
margin:20px 0px;
}
body{
font-size: 12px;
font-family: Arial;
}
a:hover{
text-decoration:none;
color: #C40000;
}
div.productReviewContentPart{
padding-top: 50px;
}
div.productReviewItem{
border-bottom: 1px solid #E3E3E3;
margin: 10px 0px;
}
div.productReviewItem div.productReviewItemDesc{
width: 80%;
display: inline-block;
color: #333333;
margin: 5px 20px;
float: left;
}
div.productReviewItemDate{
margin: 15px 0px 0px 0px;
color: #CCCCCC;
}
div.productReviewItem div.productReviewItemUserInfo{
color: #404040;
margin: 5px 20px;
padding: 20px 0;
}
span.userInfoGrayPart{
color: #999999;
}
</style>
<div class="productDetailDiv" style="display: block;">
<div class="productDetailTopPart">
<a class="productDetailTopPartSelectedLink selected" href="#nowhere">商品详情</a>
<a class="productDetailTopReviewLink" href="#nowhere">累计评价 <span class="productDetailTopReviewLinkNumber">19</span> </a>
</div>
<div class="productParamterPart">
<div class="productParamter">产品参数:</div>
<div class="productParamterList">
<span>材质成分: 聚酯纤维100% </span>
<span>品牌: Emyche/艾米秋 </span>
<span>货号: 129668 </span>
<span>尺码: L M S XL X </span>
<span>上市年份季节: 2016年夏季 </span>
<span>颜色分类: 白色 黑色 浅蓝 </span>
<span>适用年龄: 18-25周岁 </span>
</div>
<div style="clear:both"></div>
</div>
<div class="productDetailImagesPart">
<img src="http://127.0.0.1/tmall/img/productDetail/8626.jpg">
</div>
</div>
<div class="productReviewDiv" style="display: block;">
<div class="productReviewTopPart">
<a class="productReviewTopPartSelectedLink" href="#nowhere">商品详情</a>
<a class="selected" href="#nowhere">累计评价 <span class="productReviewTopReviewLinkNumber">19</span> </a>
</div>
<div class="productReviewContentPart">
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
不错的购物,包装很精细,布料也不错舒服,因为之前一直购买品牌装,很好的一次网购,生完宝宝刚刚一个多月我一百五十斤穿2XL不错
</div>
<div class="productReviewItemDate">2016-08-10</div>
</div>
<div class="productReviewItemUserInfo">
哀****莉<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
面料很好,大小也刚刚好,本来买之前还担心,犹豫,等货到了,比我心中想象的好很多,大家放心购买,很满意的购物,以后还会来??
</div>
<div class="productReviewItemDate">2016-08-23</div>
</div>
<div class="productReviewItemUserInfo">
贤*闲<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
<span>商品:</span>宝贝料子和手感都不错,是值这价,卖家很贴心的送了内衣带,5分好评是必须的。喜欢的可以 下手了
</div>
<div class="productReviewItemDate">2016-08-16</div>
</div>
<div class="productReviewItemUserInfo">
孤*****爱<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服收到了,给朋友买的,真心不错,料子也特别好,穿起来特别有气质,跟模特穿的效果差不多。。。好评,好评
</div>
<div class="productReviewItemDate">2016-08-19</div>
</div>
<div class="productReviewItemUserInfo">
哀****莉<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服不错,手感不错,试穿很有型,真心的喜欢,谢谢老板
</div>
<div class="productReviewItemDate">2016-07-19</div>
</div>
<div class="productReviewItemUserInfo">
孤*****爱<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
喜欢(⊙o⊙)哦,美美哒,值得一试!!!宽松雪纺,很舒服
</div>
<div class="productReviewItemDate">2016-08-10</div>
</div>
<div class="productReviewItemUserInfo">
这****0<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服已经收到,大小很合适,面料也可以,就是感觉衣服面料有一点厚,其他都还不错,款式也好看,希望店家多出一点新款,以后回来光顾你们。?
</div>
<div class="productReviewItemDate">2016-07-10</div>
</div>
<div class="productReviewItemUserInfo">
y****心<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
很漂亮的衣服,料子有垂感,我很满意,老公也说好呢
</div>
<div class="productReviewItemDate">2016-07-27</div>
</div>
<div class="productReviewItemUserInfo">
阿*丶<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
真不错,已经迫不及待的穿上了,朋友们都说好,挺有气质的,就是上衣稍微有点肥,不过肉肉被藏起来了!有看上的赶紧下单吧!
</div>
<div class="productReviewItemDate">2016-08-12</div>
</div>
<div class="productReviewItemUserInfo">
名*****_<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
质量是真的不错,适合个子高一点的美眉穿,很漂亮?
</div>
<div class="productReviewItemDate">2016-08-03</div>
</div>
<div class="productReviewItemUserInfo">
安**°<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
再买的时候纠结了好久,最后还是选择在这里购买,一次满意的网购,让我对网购有了希望,或刚收到,因觉得物超所值,就迫不及待拍了照片,那个玻璃的声音非常脆,我个人觉得挺好的,值得拥有!
</div>
<div class="productReviewItemDate">2016-08-08</div>
</div>
<div class="productReviewItemUserInfo">
这****0<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
<span>服务:</span>不错
</div>
<div class="productReviewItemDate">2016-08-20</div>
</div>
<div class="productReviewItemUserInfo">
醉**心<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
强烈推荐,我的天,质量也太好了,让我情何以堪,大爱啊。说说我的体格吧,162.105斤,腰围大概是22,穿m码刚刚好。快递那么快,特地跟店家说10号要外出店家也尽心备注的很好。真的特别感动,我收藏店铺了,下次还来你们家。衣服比雪纺舒服,薄薄的,现在穿刚好,我配了高跟鞋和小白鞋都很完美。店家还送了无痕肩带,真的太细心了,给一百个好评,赞。衣服我看了没有线头,薄薄的。不说了,我赶紧发给我姐让她看看。
</div>
<div class="productReviewItemDate">2016-08-17</div>
</div>
<div class="productReviewItemUserInfo">
安**°<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
此用户没有填写评论!
</div>
<div class="productReviewItemDate">2016-07-21</div>
</div>
<div class="productReviewItemUserInfo">
乱**型<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服质量真心不错很厚实,上身效果很棒哦,穿起来很舒服,很洋气。价格也很合理……赞赞赞
</div>
<div class="productReviewItemDate">2016-08-19</div>
</div>
<div class="productReviewItemUserInfo">
丶***眠<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服裤子都很合身,同事笑我说这是我买得最好看最时尚的一套衣服,衣服上身效果也不错,很是满意,还送了隐形带,正好用上,质量很好穿着凉快,唯一不足的就是洗了后需要烫一下才不皱,不过不影响衣服的美,很满意。上传两张没P的照片
</div>
<div class="productReviewItemDate">2016-08-08</div>
</div>
<div class="productReviewItemUserInfo">
乱**型<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
不好意思好久才来评价 质量好 上身效果好 主要有胖子穿的漂亮衣服啦 赞赞赞
</div>
<div class="productReviewItemDate">2016-07-11</div>
</div>
<div class="productReviewItemUserInfo">
l******1<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
网购以来为数不多的质量好到超乎意料,穿上特别舒服,大小也正合适,超赞!这个店里值得好好逛逛!
</div>
<div class="productReviewItemDate">2016-07-10</div>
</div>
<div class="productReviewItemUserInfo">
盗**记<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
宝贝面料很舒服,一字领也非常美,说实话是充上衣买的!犹豫了很长时间才下定决心的,很喜欢,很满意!喜欢就是最值的!
</div>
<div class="productReviewItemDate">2016-07-24</div>
</div>
<div class="productReviewItemUserInfo">
贤*闲<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
</div>
</div>
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://127.0.0.1/study../../../js/jquery/2.0.0/jquery.min.js"></script>
<link href="http://127.0.0.1/study../../../css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="http://127.0.0.1/study../../../js/bootstrap/3.3.6/bootstrap.min.js"></script>
</head>
<script>
$(function(){
$("div.productReviewDiv").hide();
$("a.productDetailTopReviewLink").click(function(){
$("div.productReviewDiv").show();
$("div.productDetailDiv").hide();
});
$("a.productReviewTopPartSelectedLink").click(function(){
$("div.productReviewDiv").hide();
$("div.productDetailDiv").show();
});
})
</script>
<style>
div.productDetailDiv{
width: 790px;
margin: 40px auto;
}
div.productDetailTopPart{
border: 1px solid #DFDFDF;
border-left-width: 0px;
}
a.selected{
border-left: 1px solid #cfbfb1;
border-right: 1px solid #cfbfb1;
color: #b10000;
display: inline-block;
font-weight: bold;
line-height: 46px;
width: 90px;
text-align: center;
position: relative;
}
a.selected:before{
border-color: #b00000;
border-style: solid;
border-width: 1px;
content: "";
display: block;
width: 90px;
height: 0;
position: absolute;
top: -1px;
margin-left: -1px;
}
a.selected:after{
border-color: #b00000 transparent transparent;
border-style: solid;
border-width: 5px;
content: "";
display: block;
width: 0;
height: 0;
position: absolute;
top: -1px;
left: 50%;
margin-left: -5px;
}
a.productDetailTopReviewLink{
padding: 0px 20px;
border-right: 1px dotted #D2D2D2;
color: #333333;
}
div.productReviewDiv{
width: 790px;
margin: 40px auto;
}
div.productReviewTopPart{
border: 1px solid #DFDFDF;
}
a.productReviewTopPartSelectedLink{
padding: 0px 20px;
color: #333333;
}
span.productDetailTopReviewLinkNumber{
color: #3355B9;
}
div.productParamterPart{
border: 1px solid #DFDFDF;
padding: 40px;
}
div.productParamter{
color: #999999;
font-weight: bold;
margin-bottom: 20px;
}
div.productParamterList span{
display: block;
width: 220px;
float: left;
padding: 8px 0px;
color: #666666;
}
div.productDetailImagesPart img{
display: block;
width: 790px;
margin:20px 0px;
}
body{
font-size: 12px;
font-family: Arial;
}
a:hover{
text-decoration:none;
color: #C40000;
}
div.productReviewContentPart{
padding-top: 50px;
}
div.productReviewItem{
border-bottom: 1px solid #E3E3E3;
margin: 10px 0px;
}
div.productReviewItem div.productReviewItemDesc{
width: 80%;
display: inline-block;
color: #333333;
margin: 5px 20px;
float: left;
}
div.productReviewItemDate{
margin: 15px 0px 0px 0px;
color: #CCCCCC;
}
div.productReviewItem div.productReviewItemUserInfo{
color: #404040;
margin: 5px 20px;
padding: 20px 0;
}
span.userInfoGrayPart{
color: #999999;
}
</style>
<div class="productDetailDiv" style="display: block;">
<div class="productDetailTopPart">
<a class="productDetailTopPartSelectedLink selected" href="#nowhere">商品详情</a>
<a class="productDetailTopReviewLink" href="#nowhere">累计评价 <span class="productDetailTopReviewLinkNumber">19</span> </a>
</div>
<div class="productParamterPart">
<div class="productParamter">产品参数:</div>
<div class="productParamterList">
<span>材质成分: 聚酯纤维100% </span>
<span>品牌: Emyche/艾米秋 </span>
<span>货号: 129668 </span>
<span>尺码: L M S XL X </span>
<span>上市年份季节: 2016年夏季 </span>
<span>颜色分类: 白色 黑色 浅蓝 </span>
<span>适用年龄: 18-25周岁 </span>
</div>
<div style="clear:both"></div>
</div>
<div class="productDetailImagesPart">
<img src="http://127.0.0.1/tmall/img/productDetail/8626.jpg">
</div>
</div>
<div class="productReviewDiv" style="display: block;">
<div class="productReviewTopPart">
<a class="productReviewTopPartSelectedLink" href="#nowhere">商品详情</a>
<a class="selected" href="#nowhere">累计评价 <span class="productReviewTopReviewLinkNumber">19</span> </a>
</div>
<div class="productReviewContentPart">
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
不错的购物,包装很精细,布料也不错舒服,因为之前一直购买品牌装,很好的一次网购,生完宝宝刚刚一个多月我一百五十斤穿2XL不错
</div>
<div class="productReviewItemDate">2016-08-10</div>
</div>
<div class="productReviewItemUserInfo">
哀****莉<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
面料很好,大小也刚刚好,本来买之前还担心,犹豫,等货到了,比我心中想象的好很多,大家放心购买,很满意的购物,以后还会来??
</div>
<div class="productReviewItemDate">2016-08-23</div>
</div>
<div class="productReviewItemUserInfo">
贤*闲<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
<span>商品:</span>宝贝料子和手感都不错,是值这价,卖家很贴心的送了内衣带,5分好评是必须的。喜欢的可以 下手了
</div>
<div class="productReviewItemDate">2016-08-16</div>
</div>
<div class="productReviewItemUserInfo">
孤*****爱<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服收到了,给朋友买的,真心不错,料子也特别好,穿起来特别有气质,跟模特穿的效果差不多。。。好评,好评
</div>
<div class="productReviewItemDate">2016-08-19</div>
</div>
<div class="productReviewItemUserInfo">
哀****莉<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服不错,手感不错,试穿很有型,真心的喜欢,谢谢老板
</div>
<div class="productReviewItemDate">2016-07-19</div>
</div>
<div class="productReviewItemUserInfo">
孤*****爱<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
喜欢(⊙o⊙)哦,美美哒,值得一试!!!宽松雪纺,很舒服
</div>
<div class="productReviewItemDate">2016-08-10</div>
</div>
<div class="productReviewItemUserInfo">
这****0<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服已经收到,大小很合适,面料也可以,就是感觉衣服面料有一点厚,其他都还不错,款式也好看,希望店家多出一点新款,以后回来光顾你们。?
</div>
<div class="productReviewItemDate">2016-07-10</div>
</div>
<div class="productReviewItemUserInfo">
y****心<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
很漂亮的衣服,料子有垂感,我很满意,老公也说好呢
</div>
<div class="productReviewItemDate">2016-07-27</div>
</div>
<div class="productReviewItemUserInfo">
阿*丶<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
真不错,已经迫不及待的穿上了,朋友们都说好,挺有气质的,就是上衣稍微有点肥,不过肉肉被藏起来了!有看上的赶紧下单吧!
</div>
<div class="productReviewItemDate">2016-08-12</div>
</div>
<div class="productReviewItemUserInfo">
名*****_<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
质量是真的不错,适合个子高一点的美眉穿,很漂亮?
</div>
<div class="productReviewItemDate">2016-08-03</div>
</div>
<div class="productReviewItemUserInfo">
安**°<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
再买的时候纠结了好久,最后还是选择在这里购买,一次满意的网购,让我对网购有了希望,或刚收到,因觉得物超所值,就迫不及待拍了照片,那个玻璃的声音非常脆,我个人觉得挺好的,值得拥有!
</div>
<div class="productReviewItemDate">2016-08-08</div>
</div>
<div class="productReviewItemUserInfo">
这****0<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
<span>服务:</span>不错
</div>
<div class="productReviewItemDate">2016-08-20</div>
</div>
<div class="productReviewItemUserInfo">
醉**心<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
强烈推荐,我的天,质量也太好了,让我情何以堪,大爱啊。说说我的体格吧,162.105斤,腰围大概是22,穿m码刚刚好。快递那么快,特地跟店家说10号要外出店家也尽心备注的很好。真的特别感动,我收藏店铺了,下次还来你们家。衣服比雪纺舒服,薄薄的,现在穿刚好,我配了高跟鞋和小白鞋都很完美。店家还送了无痕肩带,真的太细心了,给一百个好评,赞。衣服我看了没有线头,薄薄的。不说了,我赶紧发给我姐让她看看。
</div>
<div class="productReviewItemDate">2016-08-17</div>
</div>
<div class="productReviewItemUserInfo">
安**°<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
此用户没有填写评论!
</div>
<div class="productReviewItemDate">2016-07-21</div>
</div>
<div class="productReviewItemUserInfo">
乱**型<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服质量真心不错很厚实,上身效果很棒哦,穿起来很舒服,很洋气。价格也很合理……赞赞赞
</div>
<div class="productReviewItemDate">2016-08-19</div>
</div>
<div class="productReviewItemUserInfo">
丶***眠<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
衣服裤子都很合身,同事笑我说这是我买得最好看最时尚的一套衣服,衣服上身效果也不错,很是满意,还送了隐形带,正好用上,质量很好穿着凉快,唯一不足的就是洗了后需要烫一下才不皱,不过不影响衣服的美,很满意。上传两张没P的照片
</div>
<div class="productReviewItemDate">2016-08-08</div>
</div>
<div class="productReviewItemUserInfo">
乱**型<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
不好意思好久才来评价 质量好 上身效果好 主要有胖子穿的漂亮衣服啦 赞赞赞
</div>
<div class="productReviewItemDate">2016-07-11</div>
</div>
<div class="productReviewItemUserInfo">
l******1<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
网购以来为数不多的质量好到超乎意料,穿上特别舒服,大小也正合适,超赞!这个店里值得好好逛逛!
</div>
<div class="productReviewItemDate">2016-07-10</div>
</div>
<div class="productReviewItemUserInfo">
盗**记<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
<div class="productReviewItem">
<div class="productReviewItemDesc">
<div class="productReviewItemContent">
宝贝面料很舒服,一字领也非常美,说实话是充上衣买的!犹豫了很长时间才下定决心的,很喜欢,很满意!喜欢就是最值的!
</div>
<div class="productReviewItemDate">2016-07-24</div>
</div>
<div class="productReviewItemUserInfo">
贤*闲<span class="userInfoGrayPart">(匿名)</span>
</div>
<div style="clear:both"></div>
</div>
</div>
</div>
");
window.frames["iframe3260"].document.write(decodeHtml(code3260));
window.frames["iframe3260"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3260"]).load(function(){
$("#iframe3260").height($("#iframe3260").contents().find("body").height()+showittryitheight);
});
$("#iframe3260").height($("#iframe3260").contents().find("body").height()+showittryitheight);
alreadyWriteCode3260 = code3260;
$("#rendering3260").hide();
$("#rendered3260").show();
}
var tRereshRetry2DemoPanel3260 = setInterval(rereshRetry2DemoPanel3260,1000);
var binded3260 = false;
$("textarea#stepcodeTextarea3260").keyup(function(){
if(!binded3260){
$(window).bind('beforeunload',function(){
binded3260 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3260 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3260!=newCode){
// window.frames["iframe3260"].document.write("
");
// window.frames["iframe3260"].document.write(decodeHtml($("textarea#stepcodeTextarea3260").val()));
// window.frames["iframe3260"].document.close();
// $(window.frames["iframe3260"]).load(function(){
// $("#iframe3260").height($("#iframe3260").contents().find("body").height()+showittryitheight);
// });
// code3260 = newCode;
// }
});
$(".tryButton3260").click(function(){
$("#tryDiv3260").show();
$("#stepcodeTextarea3260").focus();
$("#stepcodeTextarea3260").height(200);
$("#iframe3260").height(0);
window.frames["iframe3260"].document.write("
");
window.frames["iframe3260"].document.write(decodeHtml($("textarea#stepcodeTextarea3260").val()));
window.frames["iframe3260"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3260"]).load(function(){
$("#iframe3260").height($("#iframe3260").contents().find("body").height()+showittryitheight);
});
$("#iframe3260").height($("#iframe3260").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3260.focus();
editor3260.setSize(null, "250");
$("#rendering3260").hide();
$("#rendered3260").hide();
});
var mixedMode = {
name: "htmlmixed",
scriptTypes: [{matches: /\/x-handlebars-template|\/x-mustache/i,
mode: null},
{matches: /(text|application)\/(x-)?vb(a|script)/i,
mode: "vbscript"}]
};
var editor3260 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3260"), {
lineNumbers: true,
styleActiveLine: true,
matchBrackets: true,
mode:"text/html",
theme:"eclipse",
selectionPointer: true,
lineWrapping: true,
extraKeys: {
"Alt-/": "autocomplete",
"Ctrl-F": "findPersistent",
"F8": function(cm) {
cm.setOption("fullScreen", !cm.getOption("fullScreen"));
},
"Esc": function(cm) {
if (cm.getOption("fullScreen")) cm.setOption("fullScreen", false);
}
}
});
editor3260.on("change",function(doc){
if(!binded3260){
$(window).bind('beforeunload',function(){
binded3260 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3260 = newCode;
$("textarea#stepcodeTextarea3260").val(newCode);
if(alreadyWriteCode3260!=code3260){
lastModifedTime3260 = new Date().getTime();
$("#rendering3260").show();
$("#rendered3260").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3260 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3260.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3260").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
步骤
6
:
切换商品详情和累计评价js代码讲解
顶
折
增值内容,请先登录
代码高亮插件双击即可选中,不过部分同学反应,通过代码高亮插件复制的代码无法在IDEA里正常显示,这里提供TEXTAREA的方式,方便复制,谢谢
1. 自行完成练习
根据练习目标尽量自己实现代码效果,期间会碰到疑问,难题,和自己不懂的地方,这些都是必要的过程
2. 带着疑问查看答案
完成过程中,碰到无法解决的问题,带着疑问,查看答案,分析答案的解决思路
3. 查看答案讲解视频
依然有不明白的地方,点开视频讲解,带着疑问,听视频讲解有问题的部分
4. 再做一遍
理解后,再从头做一遍,把有疑问的地方都捋清楚
5. 总结
最后再总结一遍,总结思路,总结解决办法,以后遇到类似的问题,怎么处理
HOW2J公众号,关注后实时获知布最新的教程和优惠活动,谢谢。
提问之前请登陆
|