");
window.frames["iframe_show3341"].document.write(decodeHtml($("textarea#stepcodeTextarea3341").val()));
window.frames["iframe_show3341"].document.close();
$(window.frames["iframe_show3341"]).load(function(){
$("#iframe_show3341").height($("#iframe_show3341").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3341").height($("#iframe_show3341").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>
<style>
div.reviewDiv{
max-width: 1013px;
margin: 10px auto;
}
div.reviewProductInfoImg{
border: 1px solid #E7E7E7;
width: 464px;
text-align: center;
float: left;
}
div.reviewProductInfoRightDiv{
overflow: hidden;
border-top: 1px solid #E7E7E7;
padding: 30px 20px;
}
div.reviewProductInfoRightText{
color: black;
font-size: 16px;
font-weight: bold;
}
table.reviewProductInfoTable{
margin: 20px 10px;
font-size:12px;
}
table.reviewProductInfoTable td{
padding-bottom: 5px;
color: #999999;
}
span.reviewProductInfoTablePrice{
color: #C40000;
font-size: 20px;
font-weight: bold;
}
span.reviewProductInfoTableSellNumber{
color: #C40000;
font-size: 14px;
font-weight: bold;
}
div.reviewProductInfoRightBelowDiv{
border: 1px solid #F6F5F3;
background-color: #FDFBFA;
height: 166px;
padding:16px 0px 16px 81px;
}
span.reviewProductInfoRightBelowImg{
background-color: white;
border: 1px solid #E1E1E1;
display: inline-block;
width: 23px;
height: 42px;
background-image:url(http://127.0.0.1/tmall../../../img/site/reviewLight.png);
background-repeat: no-repeat;
padding: 0px;
}
span.reviewProductInfoRightBelowText{
border: 1px solid #EFEFEF;
display: inline-block;
width: 200px;
height: 42px;
padding: 4px;
position: relative;
left: -4px;
top: -7px;
color: #666666;
font-size:12px;
}
img.reviewProductImg{
width:400px;
height:400px;
}
</style>
<div class="reviewDiv">
<div class="reviewProductInfoDiv">
<div class="reviewProductInfoImg"><img class="reviewProductImg" width="100px" height="100px" src="http://127.0.0.1/tmall/img/productSingle/8697.jpg"></div>
<div class="reviewProductInfoRightDiv">
<div class="reviewProductInfoRightText">
2016夏季新款女装雪纺衫短裤两件套 韩版时尚名媛休闲套装女夏装
</div>
<table class="reviewProductInfoTable">
<tbody><tr>
<td width="75px">价格:</td>
<td><span class="reviewProductInfoTablePrice">¥263.00</span> 元 </td>
</tr>
<tr>
<td>配送</td>
<td>快递: 0.00</td>
</tr>
<tr>
<td>月销量:</td>
<td><span class="reviewProductInfoTableSellNumber">50</span> 件</td>
</tr>
</tbody></table>
<div class="reviewProductInfoRightBelowDiv">
<span class="reviewProductInfoRightBelowImg"><img1 src="http://127.0.0.1/tmall../../../img/site/reviewLight.png"></img1></span>
<span class="reviewProductInfoRightBelowText">现在查看的是 您所购买商品的信息
于2016年09月12下单购买了此商品 </span>
</div>
</div>
<div style="clear:both"></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>
<style>
div.reviewDiv{
max-width: 1013px;
margin: 10px auto;
}
div.reviewProductInfoImg{
border: 1px solid #E7E7E7;
width: 464px;
text-align: center;
float: left;
}
div.reviewProductInfoRightDiv{
overflow: hidden;
border-top: 1px solid #E7E7E7;
padding: 30px 20px;
}
div.reviewProductInfoRightText{
color: black;
font-size: 16px;
font-weight: bold;
}
table.reviewProductInfoTable{
margin: 20px 10px;
font-size:12px;
}
table.reviewProductInfoTable td{
padding-bottom: 5px;
color: #999999;
}
span.reviewProductInfoTablePrice{
color: #C40000;
font-size: 20px;
font-weight: bold;
}
span.reviewProductInfoTableSellNumber{
color: #C40000;
font-size: 14px;
font-weight: bold;
}
div.reviewProductInfoRightBelowDiv{
border: 1px solid #F6F5F3;
background-color: #FDFBFA;
height: 166px;
padding:16px 0px 16px 81px;
}
span.reviewProductInfoRightBelowImg{
background-color: white;
border: 1px solid #E1E1E1;
display: inline-block;
width: 23px;
height: 42px;
background-image:url(http://127.0.0.1/tmall../../../img/site/reviewLight.png);
background-repeat: no-repeat;
padding: 0px;
}
span.reviewProductInfoRightBelowText{
border: 1px solid #EFEFEF;
display: inline-block;
width: 200px;
height: 42px;
padding: 4px;
position: relative;
left: -4px;
top: -7px;
color: #666666;
font-size:12px;
}
img.reviewProductImg{
width:400px;
height:400px;
}
</style>
<div class="reviewDiv">
<div class="reviewProductInfoDiv">
<div class="reviewProductInfoImg"><img class="reviewProductImg" width="100px" height="100px" src="http://127.0.0.1/tmall/img/productSingle/8697.jpg"></div>
<div class="reviewProductInfoRightDiv">
<div class="reviewProductInfoRightText">
2016夏季新款女装雪纺衫短裤两件套 韩版时尚名媛休闲套装女夏装
</div>
<table class="reviewProductInfoTable">
<tbody><tr>
<td width="75px">价格:</td>
<td><span class="reviewProductInfoTablePrice">¥263.00</span> 元 </td>
</tr>
<tr>
<td>配送</td>
<td>快递: 0.00</td>
</tr>
<tr>
<td>月销量:</td>
<td><span class="reviewProductInfoTableSellNumber">50</span> 件</td>
</tr>
</tbody></table>
<div class="reviewProductInfoRightBelowDiv">
<span class="reviewProductInfoRightBelowImg"><img1 src="http://127.0.0.1/tmall../../../img/site/reviewLight.png"></img1></span>
<span class="reviewProductInfoRightBelowText">现在查看的是 您所购买商品的信息
于2016年09月12下单购买了此商品 </span>
</div>
</div>
<div style="clear:both"></div>
</div>
</div>
");
window.frames["iframe3341"].document.write(decodeHtml(code3341));
window.frames["iframe3341"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3341"]).load(function(){
$("#iframe3341").height($("#iframe3341").contents().find("body").height()+showittryitheight);
});
$("#iframe3341").height($("#iframe3341").contents().find("body").height()+showittryitheight);
alreadyWriteCode3341 = code3341;
$("#rendering3341").hide();
$("#rendered3341").show();
}
var tRereshRetry2DemoPanel3341 = setInterval(rereshRetry2DemoPanel3341,1000);
var binded3341 = false;
$("textarea#stepcodeTextarea3341").keyup(function(){
if(!binded3341){
$(window).bind('beforeunload',function(){
binded3341 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3341 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3341!=newCode){
// window.frames["iframe3341"].document.write("
");
// window.frames["iframe3341"].document.write(decodeHtml($("textarea#stepcodeTextarea3341").val()));
// window.frames["iframe3341"].document.close();
// $(window.frames["iframe3341"]).load(function(){
// $("#iframe3341").height($("#iframe3341").contents().find("body").height()+showittryitheight);
// });
// code3341 = newCode;
// }
});
$(".tryButton3341").click(function(){
$("#tryDiv3341").show();
$("#stepcodeTextarea3341").focus();
$("#stepcodeTextarea3341").height(200);
$("#iframe3341").height(0);
window.frames["iframe3341"].document.write("
");
window.frames["iframe3341"].document.write(decodeHtml($("textarea#stepcodeTextarea3341").val()));
window.frames["iframe3341"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3341"]).load(function(){
$("#iframe3341").height($("#iframe3341").contents().find("body").height()+showittryitheight);
});
$("#iframe3341").height($("#iframe3341").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3341.focus();
editor3341.setSize(null, "250");
$("#rendering3341").hide();
$("#rendered3341").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 editor3341 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3341"), {
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);
}
}
});
editor3341.on("change",function(doc){
if(!binded3341){
$(window).bind('beforeunload',function(){
binded3341 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3341 = newCode;
$("textarea#stepcodeTextarea3341").val(newCode);
if(alreadyWriteCode3341!=code3341){
lastModifedTime3341 = new Date().getTime();
$("#rendering3341").show();
$("#rendered3341").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3341 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3341.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3341").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|