|
");
window.frames["iframe_toc"+sid].document.write(decodeHtml($("pre#stepCodePre"+sid).html()));
window.frames["iframe_toc"+sid].document.close();
$(window.frames["iframe_toc"+sid]).load(function(){
$("#iframe_toc"+sid).height($("#iframe_toc"+sid).contents().find("body").height()+(showittryitheight));
});
$("#iframe_toc"+sid).height($("#iframe_toc"+sid).contents().find("body").height()+(showittryitheight));
}
$("input.tocName").hover(function(){
$(this).select();
});
function refresh(){
var sid = tocstepids.shift();
if(null!=sid)
refreshIframe(sid);
else
go2ArchorFlag = true;
}
var t = setInterval(refresh,300);
// $("div.steptoc iframe").height($(showittryitheight+50));
});
效果 |
说明 |
示例代码 |
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
</div>
|
基本面板
|
示例代码
|
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
|
面板标题
|
示例代码
|
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
<div class="panel-footer">面板脚注</div>
</div>
|
面板脚注
|
示例代码
|
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
|
面板颜色
|
示例代码
|
示例
1
:
基本面板
示例
2
:
面板标题
示例
3
:
面板脚注
示例
4
:
面板颜色
");
window.frames["iframe_show2995"].document.write(decodeHtml($("textarea#stepcodeTextarea2995").val()));
window.frames["iframe_show2995"].document.close();
$(window.frames["iframe_show2995"]).load(function(){
$("#iframe_show2995").height($("#iframe_show2995").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2995").height($("#iframe_show2995").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
</div>
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
</div>
");
window.frames["iframe2995"].document.write(decodeHtml(code2995));
window.frames["iframe2995"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2995"]).load(function(){
$("#iframe2995").height($("#iframe2995").contents().find("body").height()+showittryitheight);
});
$("#iframe2995").height($("#iframe2995").contents().find("body").height()+showittryitheight);
alreadyWriteCode2995 = code2995;
$("#rendering2995").hide();
$("#rendered2995").show();
}
var tRereshRetry2DemoPanel2995 = setInterval(rereshRetry2DemoPanel2995,1000);
var binded2995 = false;
$("textarea#stepcodeTextarea2995").keyup(function(){
if(!binded2995){
$(window).bind('beforeunload',function(){
binded2995 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2995 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2995!=newCode){
// window.frames["iframe2995"].document.write("
");
// window.frames["iframe2995"].document.write(decodeHtml($("textarea#stepcodeTextarea2995").val()));
// window.frames["iframe2995"].document.close();
// $(window.frames["iframe2995"]).load(function(){
// $("#iframe2995").height($("#iframe2995").contents().find("body").height()+showittryitheight);
// });
// code2995 = newCode;
// }
});
$(".tryButton2995").click(function(){
$("#tryDiv2995").show();
$("#stepcodeTextarea2995").focus();
$("#stepcodeTextarea2995").height(200);
$("#iframe2995").height(0);
window.frames["iframe2995"].document.write("
");
window.frames["iframe2995"].document.write(decodeHtml($("textarea#stepcodeTextarea2995").val()));
window.frames["iframe2995"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2995"]).load(function(){
$("#iframe2995").height($("#iframe2995").contents().find("body").height()+showittryitheight);
});
$("#iframe2995").height($("#iframe2995").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2995.focus();
editor2995.setSize(null, "250");
$("#rendering2995").hide();
$("#rendered2995").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 editor2995 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2995"), {
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);
}
}
});
editor2995.on("change",function(doc){
if(!binded2995){
$(window).bind('beforeunload',function(){
binded2995 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2995 = newCode;
$("textarea#stepcodeTextarea2995").val(newCode);
if(alreadyWriteCode2995!=code2995){
lastModifedTime2995 = new Date().getTime();
$("#rendering2995").show();
$("#rendered2995").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2995 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2995.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2995").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2996"].document.write(decodeHtml($("textarea#stepcodeTextarea2996").val()));
window.frames["iframe_show2996"].document.close();
$(window.frames["iframe_show2996"]).load(function(){
$("#iframe_show2996").height($("#iframe_show2996").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2996").height($("#iframe_show2996").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
");
window.frames["iframe2996"].document.write(decodeHtml(code2996));
window.frames["iframe2996"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2996"]).load(function(){
$("#iframe2996").height($("#iframe2996").contents().find("body").height()+showittryitheight);
});
$("#iframe2996").height($("#iframe2996").contents().find("body").height()+showittryitheight);
alreadyWriteCode2996 = code2996;
$("#rendering2996").hide();
$("#rendered2996").show();
}
var tRereshRetry2DemoPanel2996 = setInterval(rereshRetry2DemoPanel2996,1000);
var binded2996 = false;
$("textarea#stepcodeTextarea2996").keyup(function(){
if(!binded2996){
$(window).bind('beforeunload',function(){
binded2996 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2996 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2996!=newCode){
// window.frames["iframe2996"].document.write("
");
// window.frames["iframe2996"].document.write(decodeHtml($("textarea#stepcodeTextarea2996").val()));
// window.frames["iframe2996"].document.close();
// $(window.frames["iframe2996"]).load(function(){
// $("#iframe2996").height($("#iframe2996").contents().find("body").height()+showittryitheight);
// });
// code2996 = newCode;
// }
});
$(".tryButton2996").click(function(){
$("#tryDiv2996").show();
$("#stepcodeTextarea2996").focus();
$("#stepcodeTextarea2996").height(200);
$("#iframe2996").height(0);
window.frames["iframe2996"].document.write("
");
window.frames["iframe2996"].document.write(decodeHtml($("textarea#stepcodeTextarea2996").val()));
window.frames["iframe2996"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2996"]).load(function(){
$("#iframe2996").height($("#iframe2996").contents().find("body").height()+showittryitheight);
});
$("#iframe2996").height($("#iframe2996").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2996.focus();
editor2996.setSize(null, "250");
$("#rendering2996").hide();
$("#rendered2996").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 editor2996 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2996"), {
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);
}
}
});
editor2996.on("change",function(doc){
if(!binded2996){
$(window).bind('beforeunload',function(){
binded2996 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2996 = newCode;
$("textarea#stepcodeTextarea2996").val(newCode);
if(alreadyWriteCode2996!=code2996){
lastModifedTime2996 = new Date().getTime();
$("#rendering2996").show();
$("#rendered2996").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2996 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2996.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2996").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2997"].document.write(decodeHtml($("textarea#stepcodeTextarea2997").val()));
window.frames["iframe_show2997"].document.close();
$(window.frames["iframe_show2997"]).load(function(){
$("#iframe_show2997").height($("#iframe_show2997").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2997").height($("#iframe_show2997").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
<div class="panel-footer">面板脚注</div>
</div>
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-body">
面板内容
</div>
<div class="panel-footer">面板脚注</div>
</div>
");
window.frames["iframe2997"].document.write(decodeHtml(code2997));
window.frames["iframe2997"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2997"]).load(function(){
$("#iframe2997").height($("#iframe2997").contents().find("body").height()+showittryitheight);
});
$("#iframe2997").height($("#iframe2997").contents().find("body").height()+showittryitheight);
alreadyWriteCode2997 = code2997;
$("#rendering2997").hide();
$("#rendered2997").show();
}
var tRereshRetry2DemoPanel2997 = setInterval(rereshRetry2DemoPanel2997,1000);
var binded2997 = false;
$("textarea#stepcodeTextarea2997").keyup(function(){
if(!binded2997){
$(window).bind('beforeunload',function(){
binded2997 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2997 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2997!=newCode){
// window.frames["iframe2997"].document.write("
");
// window.frames["iframe2997"].document.write(decodeHtml($("textarea#stepcodeTextarea2997").val()));
// window.frames["iframe2997"].document.close();
// $(window.frames["iframe2997"]).load(function(){
// $("#iframe2997").height($("#iframe2997").contents().find("body").height()+showittryitheight);
// });
// code2997 = newCode;
// }
});
$(".tryButton2997").click(function(){
$("#tryDiv2997").show();
$("#stepcodeTextarea2997").focus();
$("#stepcodeTextarea2997").height(200);
$("#iframe2997").height(0);
window.frames["iframe2997"].document.write("
");
window.frames["iframe2997"].document.write(decodeHtml($("textarea#stepcodeTextarea2997").val()));
window.frames["iframe2997"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2997"]).load(function(){
$("#iframe2997").height($("#iframe2997").contents().find("body").height()+showittryitheight);
});
$("#iframe2997").height($("#iframe2997").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2997.focus();
editor2997.setSize(null, "250");
$("#rendering2997").hide();
$("#rendered2997").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 editor2997 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2997"), {
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);
}
}
});
editor2997.on("change",function(doc){
if(!binded2997){
$(window).bind('beforeunload',function(){
binded2997 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2997 = newCode;
$("textarea#stepcodeTextarea2997").val(newCode);
if(alreadyWriteCode2997!=code2997){
lastModifedTime2997 = new Date().getTime();
$("#rendering2997").show();
$("#rendered2997").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2997 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2997.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2997").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2998"].document.write(decodeHtml($("textarea#stepcodeTextarea2998").val()));
window.frames["iframe_show2998"].document.close();
$(window.frames["iframe_show2998"]).load(function(){
$("#iframe_show2998").height($("#iframe_show2998").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2998").height($("#iframe_show2998").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<!DOCTYPE html>
<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>
<div class="panel panel-default">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-success">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-info">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-warning">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
<div class="panel panel-danger">
<div class="panel-heading">面板标题</div>
<div class="panel-body">
面板内容
</div>
</div>
");
window.frames["iframe2998"].document.write(decodeHtml(code2998));
window.frames["iframe2998"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2998"]).load(function(){
$("#iframe2998").height($("#iframe2998").contents().find("body").height()+showittryitheight);
});
$("#iframe2998").height($("#iframe2998").contents().find("body").height()+showittryitheight);
alreadyWriteCode2998 = code2998;
$("#rendering2998").hide();
$("#rendered2998").show();
}
var tRereshRetry2DemoPanel2998 = setInterval(rereshRetry2DemoPanel2998,1000);
var binded2998 = false;
$("textarea#stepcodeTextarea2998").keyup(function(){
if(!binded2998){
$(window).bind('beforeunload',function(){
binded2998 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2998 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2998!=newCode){
// window.frames["iframe2998"].document.write("
");
// window.frames["iframe2998"].document.write(decodeHtml($("textarea#stepcodeTextarea2998").val()));
// window.frames["iframe2998"].document.close();
// $(window.frames["iframe2998"]).load(function(){
// $("#iframe2998").height($("#iframe2998").contents().find("body").height()+showittryitheight);
// });
// code2998 = newCode;
// }
});
$(".tryButton2998").click(function(){
$("#tryDiv2998").show();
$("#stepcodeTextarea2998").focus();
$("#stepcodeTextarea2998").height(200);
$("#iframe2998").height(0);
window.frames["iframe2998"].document.write("
");
window.frames["iframe2998"].document.write(decodeHtml($("textarea#stepcodeTextarea2998").val()));
window.frames["iframe2998"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2998"]).load(function(){
$("#iframe2998").height($("#iframe2998").contents().find("body").height()+showittryitheight);
});
$("#iframe2998").height($("#iframe2998").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2998.focus();
editor2998.setSize(null, "250");
$("#rendering2998").hide();
$("#rendered2998").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 editor2998 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2998"), {
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);
}
}
});
editor2998.on("change",function(doc){
if(!binded2998){
$(window).bind('beforeunload',function(){
binded2998 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2998 = newCode;
$("textarea#stepcodeTextarea2998").val(newCode);
if(alreadyWriteCode2998!=code2998){
lastModifedTime2998 = new Date().getTime();
$("#rendering2998").show();
$("#rendered2998").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2998 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2998.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2998").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
代码高亮插件双击即可选中,不过部分同学反应,通过代码高亮插件复制的代码无法在IDEA里正常显示,这里提供TEXTAREA的方式,方便复制,谢谢
1. 自行完成练习
根据练习目标尽量自己实现代码效果,期间会碰到疑问,难题,和自己不懂的地方,这些都是必要的过程
2. 带着疑问查看答案
完成过程中,碰到无法解决的问题,带着疑问,查看答案,分析答案的解决思路
3. 查看答案讲解视频
依然有不明白的地方,点开视频讲解,带着疑问,听视频讲解有问题的部分
4. 再做一遍
理解后,再从头做一遍,把有疑问的地方都捋清楚
5. 总结
最后再总结一遍,总结思路,总结解决办法,以后遇到类似的问题,怎么处理
HOW2J公众号,关注后实时获知布最新的教程和优惠活动,谢谢。
提问之前请登陆
|