");
window.frames["iframe_show3288"].document.write(decodeHtml($("textarea#stepcodeTextarea3288").val()));
window.frames["iframe_show3288"].document.close();
$(window.frames["iframe_show3288"]).load(function(){
$("#iframe_show3288").height($("#iframe_show3288").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3288").height($("#iframe_show3288").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.boughtDiv{
max-width: 1013px;
margin: 10px auto;
}
div.orderType div{
border-bottom: 2px solid #E8E8E8;
float: left;
}
div.orderType a{
border-right: 1px solid #E8E8E8;
display:inline-block;
font-size: 16px;
font-weight: bold;
color: black;
margin-bottom: 10px;
padding: 0px 20px;
text-decoration: none;
}
div.orderType a:hover{
color: #C40000;
text-decoration: none;
}
div.orderType div.selectedOrderType{
border-bottom: 2px solid #C40000;
}
div.orderType div.selectedOrderType a{
color: #C40000;
}
div.orderTypeLastOne{
overflow: hidden;
float: none !important;
border-bottom: 2px solid #E8E8E8;
height:35px;
}
a.noRightborder{
border-right-width:0px !important;
}
table.orderListTitleTable{
border: 1px solid #E8E8E8;
width: 100%;
margin: 20px 0px;
background-color: #F5F5F5;
text-align: center;
font-size:12px;
}
table.orderListTitleTable td{
padding: 12px 0px;
}
</style>
<div class="boughtDiv">
<div class="orderType">
<div class="selectedOrderType"><a href="#nowhere" orderstatus="all">所有订单</a></div>
<div><a href="#nowhere" orderstatus="waitPay">待付款</a></div>
<div><a href="#nowhere" orderstatus="waitDelivery">待发货</a></div>
<div><a href="#nowhere" orderstatus="waitConfirm">待收货</a></div>
<div><a class="noRightborder" href="#nowhere" orderstatus="waitReview">待评价</a></div>
<div class="orderTypeLastOne">
</div>
</div>
<div style="clear:both"></div>
<div class="orderListTitle">
<table class="orderListTitleTable">
<tbody><tr>
<td>宝贝</td>
<td width="100px">单价</td>
<td width="100px">数量</td>
<td width="120px">实付款</td>
<td width="100px">交易操作</td>
</tr>
</tbody></table>
</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.boughtDiv{
max-width: 1013px;
margin: 10px auto;
}
div.orderType div{
border-bottom: 2px solid #E8E8E8;
float: left;
}
div.orderType a{
border-right: 1px solid #E8E8E8;
display:inline-block;
font-size: 16px;
font-weight: bold;
color: black;
margin-bottom: 10px;
padding: 0px 20px;
text-decoration: none;
}
div.orderType a:hover{
color: #C40000;
text-decoration: none;
}
div.orderType div.selectedOrderType{
border-bottom: 2px solid #C40000;
}
div.orderType div.selectedOrderType a{
color: #C40000;
}
div.orderTypeLastOne{
overflow: hidden;
float: none !important;
border-bottom: 2px solid #E8E8E8;
height:35px;
}
a.noRightborder{
border-right-width:0px !important;
}
table.orderListTitleTable{
border: 1px solid #E8E8E8;
width: 100%;
margin: 20px 0px;
background-color: #F5F5F5;
text-align: center;
font-size:12px;
}
table.orderListTitleTable td{
padding: 12px 0px;
}
</style>
<div class="boughtDiv">
<div class="orderType">
<div class="selectedOrderType"><a href="#nowhere" orderstatus="all">所有订单</a></div>
<div><a href="#nowhere" orderstatus="waitPay">待付款</a></div>
<div><a href="#nowhere" orderstatus="waitDelivery">待发货</a></div>
<div><a href="#nowhere" orderstatus="waitConfirm">待收货</a></div>
<div><a class="noRightborder" href="#nowhere" orderstatus="waitReview">待评价</a></div>
<div class="orderTypeLastOne">
</div>
</div>
<div style="clear:both"></div>
<div class="orderListTitle">
<table class="orderListTitleTable">
<tbody><tr>
<td>宝贝</td>
<td width="100px">单价</td>
<td width="100px">数量</td>
<td width="120px">实付款</td>
<td width="100px">交易操作</td>
</tr>
</tbody></table>
</div>
</div>
");
window.frames["iframe3288"].document.write(decodeHtml(code3288));
window.frames["iframe3288"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3288"]).load(function(){
$("#iframe3288").height($("#iframe3288").contents().find("body").height()+showittryitheight);
});
$("#iframe3288").height($("#iframe3288").contents().find("body").height()+showittryitheight);
alreadyWriteCode3288 = code3288;
$("#rendering3288").hide();
$("#rendered3288").show();
}
var tRereshRetry2DemoPanel3288 = setInterval(rereshRetry2DemoPanel3288,1000);
var binded3288 = false;
$("textarea#stepcodeTextarea3288").keyup(function(){
if(!binded3288){
$(window).bind('beforeunload',function(){
binded3288 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3288 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3288!=newCode){
// window.frames["iframe3288"].document.write("
");
// window.frames["iframe3288"].document.write(decodeHtml($("textarea#stepcodeTextarea3288").val()));
// window.frames["iframe3288"].document.close();
// $(window.frames["iframe3288"]).load(function(){
// $("#iframe3288").height($("#iframe3288").contents().find("body").height()+showittryitheight);
// });
// code3288 = newCode;
// }
});
$(".tryButton3288").click(function(){
$("#tryDiv3288").show();
$("#stepcodeTextarea3288").focus();
$("#stepcodeTextarea3288").height(200);
$("#iframe3288").height(0);
window.frames["iframe3288"].document.write("
");
window.frames["iframe3288"].document.write(decodeHtml($("textarea#stepcodeTextarea3288").val()));
window.frames["iframe3288"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3288"]).load(function(){
$("#iframe3288").height($("#iframe3288").contents().find("body").height()+showittryitheight);
});
$("#iframe3288").height($("#iframe3288").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3288.focus();
editor3288.setSize(null, "250");
$("#rendering3288").hide();
$("#rendered3288").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 editor3288 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3288"), {
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);
}
}
});
editor3288.on("change",function(doc){
if(!binded3288){
$(window).bind('beforeunload',function(){
binded3288 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3288 = newCode;
$("textarea#stepcodeTextarea3288").val(newCode);
if(alreadyWriteCode3288!=code3288){
lastModifedTime3288 = new Date().getTime();
$("#rendering3288").show();
$("#rendered3288").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3288 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3288.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3288").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|