");
window.frames["iframe_show3359"].document.write(decodeHtml($("textarea#stepcodeTextarea3359").val()));
window.frames["iframe_show3359"].document.close();
$(window.frames["iframe_show3359"]).load(function(){
$("#iframe_show3359").height($("#iframe_show3359").contents().find("body").height()+showittryitheight);
});
$("#iframe_show3359").height($("#iframe_show3359").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.confirmPayPageDiv{
max-width: 1013px;
margin: 10px auto;
}
div.confirmPayOrderDetailDiv{
margin: 40px;
}
table.confirmPayOrderDetailTable{
width: 100%;
border-top: 1px solid #DDDDDD;
}
table.confirmPayOrderDetailTable td{
padding: 8px;
color: black;
font-size: 14px;
}
span.confirmPayOrderDetailWangWangGif{
display: inline-block;
width: 67px;
height: 22px;
background-image:url(http://127.0.0.1/tmall../../../img/site/wangwang.gif);
background-repeat: no-repeat;
background-color: transparent;
position: relative;
left: 2px;
}
div.confirmPayButtonDiv{
border: 1px solid #F58B0F;
margin: 20px;
}
div.confirmPayWarning{
margin: 20px 80px;
font-size: 18px;
color: red;
font-weight: bold;
}
button.confirmPayButton{
margin: 20px 80px;
width:67px;
height: 30px;
border: 1px solid #E67C00;
background-color: #F4A21D;
border-radius: 4px;
color: white;
font-size:12px;
}
button.confirmPayButton:hover{
background-color: #F6AE30;
}
</style>
<div class="confirmPayPageDiv">
<div class="confirmPayOrderDetailDiv">
<table class="confirmPayOrderDetailTable">
<tbody><tr>
<td>订单编号:</td>
<td>201609141114454899001 <img width="23px" src="http://127.0.0.1/tmall../../../img/site/confirmOrderTmall.png"></td>
</tr>
<tr>
<td>卖家昵称:</td>
<td>天猫商铺 <span class="confirmPayOrderDetailWangWangGif"></span></td>
</tr>
<tr>
<td>收货信息: </td>
<td>北京市 朝阳区 天安门 4栋二单元 490,朝阳群众, 15800000000,10000 </td>
</tr>
<tr>
<td>成交时间:</td>
<td>2016-09-14 11:14:45</td>
</tr>
</tbody></table>
</div>
<div class="confirmPayButtonDiv">
<div class="confirmPayWarning">请收到货后,再确认收货!否则您可能钱货两空!</div>
<a href="#nowhere"><button class="confirmPayButton">确认支付</button></a>
</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.confirmPayPageDiv{
max-width: 1013px;
margin: 10px auto;
}
div.confirmPayOrderDetailDiv{
margin: 40px;
}
table.confirmPayOrderDetailTable{
width: 100%;
border-top: 1px solid #DDDDDD;
}
table.confirmPayOrderDetailTable td{
padding: 8px;
color: black;
font-size: 14px;
}
span.confirmPayOrderDetailWangWangGif{
display: inline-block;
width: 67px;
height: 22px;
background-image:url(http://127.0.0.1/tmall../../../img/site/wangwang.gif);
background-repeat: no-repeat;
background-color: transparent;
position: relative;
left: 2px;
}
div.confirmPayButtonDiv{
border: 1px solid #F58B0F;
margin: 20px;
}
div.confirmPayWarning{
margin: 20px 80px;
font-size: 18px;
color: red;
font-weight: bold;
}
button.confirmPayButton{
margin: 20px 80px;
width:67px;
height: 30px;
border: 1px solid #E67C00;
background-color: #F4A21D;
border-radius: 4px;
color: white;
font-size:12px;
}
button.confirmPayButton:hover{
background-color: #F6AE30;
}
</style>
<div class="confirmPayPageDiv">
<div class="confirmPayOrderDetailDiv">
<table class="confirmPayOrderDetailTable">
<tbody><tr>
<td>订单编号:</td>
<td>201609141114454899001 <img width="23px" src="http://127.0.0.1/tmall../../../img/site/confirmOrderTmall.png"></td>
</tr>
<tr>
<td>卖家昵称:</td>
<td>天猫商铺 <span class="confirmPayOrderDetailWangWangGif"></span></td>
</tr>
<tr>
<td>收货信息: </td>
<td>北京市 朝阳区 天安门 4栋二单元 490,朝阳群众, 15800000000,10000 </td>
</tr>
<tr>
<td>成交时间:</td>
<td>2016-09-14 11:14:45</td>
</tr>
</tbody></table>
</div>
<div class="confirmPayButtonDiv">
<div class="confirmPayWarning">请收到货后,再确认收货!否则您可能钱货两空!</div>
<a href="#nowhere"><button class="confirmPayButton">确认支付</button></a>
</div>
</div>
");
window.frames["iframe3359"].document.write(decodeHtml(code3359));
window.frames["iframe3359"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3359"]).load(function(){
$("#iframe3359").height($("#iframe3359").contents().find("body").height()+showittryitheight);
});
$("#iframe3359").height($("#iframe3359").contents().find("body").height()+showittryitheight);
alreadyWriteCode3359 = code3359;
$("#rendering3359").hide();
$("#rendered3359").show();
}
var tRereshRetry2DemoPanel3359 = setInterval(rereshRetry2DemoPanel3359,1000);
var binded3359 = false;
$("textarea#stepcodeTextarea3359").keyup(function(){
if(!binded3359){
$(window).bind('beforeunload',function(){
binded3359 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code3359 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code3359!=newCode){
// window.frames["iframe3359"].document.write("
");
// window.frames["iframe3359"].document.write(decodeHtml($("textarea#stepcodeTextarea3359").val()));
// window.frames["iframe3359"].document.close();
// $(window.frames["iframe3359"]).load(function(){
// $("#iframe3359").height($("#iframe3359").contents().find("body").height()+showittryitheight);
// });
// code3359 = newCode;
// }
});
$(".tryButton3359").click(function(){
$("#tryDiv3359").show();
$("#stepcodeTextarea3359").focus();
$("#stepcodeTextarea3359").height(200);
$("#iframe3359").height(0);
window.frames["iframe3359"].document.write("
");
window.frames["iframe3359"].document.write(decodeHtml($("textarea#stepcodeTextarea3359").val()));
window.frames["iframe3359"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe3359"]).load(function(){
$("#iframe3359").height($("#iframe3359").contents().find("body").height()+showittryitheight);
});
$("#iframe3359").height($("#iframe3359").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor3359.focus();
editor3359.setSize(null, "250");
$("#rendering3359").hide();
$("#rendered3359").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 editor3359 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea3359"), {
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);
}
}
});
editor3359.on("change",function(doc){
if(!binded3359){
$(window).bind('beforeunload',function(){
binded3359 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code3359 = newCode;
$("textarea#stepcodeTextarea3359").val(newCode);
if(alreadyWriteCode3359!=code3359){
lastModifedTime3359 = new Date().getTime();
$("#rendering3359").show();
$("#rendered3359").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor3359 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor3359.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv3359").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|