|
");
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));
});
效果 |
说明 |
示例代码 |
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
|
标签页
|
示例代码
|
<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>
<ul class="nav nav-pills">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
|
胶囊式标签页
|
示例代码
|
<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>
<ul class="nav nav-pills nav-stacked" style="width:100px">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
|
垂直胶囊式标签页
|
示例代码
|
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation" ><a href="#">Android</a></li>
<li role="presentation" class="disabled" ><a href="#">TokyoHot</a></li>
</ul>
|
禁用的链接
|
示例代码
|
示例
1
:
标签页
示例
2
:
胶囊式标签页
示例
3
:
垂直胶囊式标签页
示例
4
:
禁用的链接
");
window.frames["iframe_show2945"].document.write(decodeHtml($("textarea#stepcodeTextarea2945").val()));
window.frames["iframe_show2945"].document.close();
$(window.frames["iframe_show2945"]).load(function(){
$("#iframe_show2945").height($("#iframe_show2945").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2945").height($("#iframe_show2945").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
");
window.frames["iframe2945"].document.write(decodeHtml(code2945));
window.frames["iframe2945"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2945"]).load(function(){
$("#iframe2945").height($("#iframe2945").contents().find("body").height()+showittryitheight);
});
$("#iframe2945").height($("#iframe2945").contents().find("body").height()+showittryitheight);
alreadyWriteCode2945 = code2945;
$("#rendering2945").hide();
$("#rendered2945").show();
}
var tRereshRetry2DemoPanel2945 = setInterval(rereshRetry2DemoPanel2945,1000);
var binded2945 = false;
$("textarea#stepcodeTextarea2945").keyup(function(){
if(!binded2945){
$(window).bind('beforeunload',function(){
binded2945 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2945 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2945!=newCode){
// window.frames["iframe2945"].document.write("
");
// window.frames["iframe2945"].document.write(decodeHtml($("textarea#stepcodeTextarea2945").val()));
// window.frames["iframe2945"].document.close();
// $(window.frames["iframe2945"]).load(function(){
// $("#iframe2945").height($("#iframe2945").contents().find("body").height()+showittryitheight);
// });
// code2945 = newCode;
// }
});
$(".tryButton2945").click(function(){
$("#tryDiv2945").show();
$("#stepcodeTextarea2945").focus();
$("#stepcodeTextarea2945").height(200);
$("#iframe2945").height(0);
window.frames["iframe2945"].document.write("
");
window.frames["iframe2945"].document.write(decodeHtml($("textarea#stepcodeTextarea2945").val()));
window.frames["iframe2945"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2945"]).load(function(){
$("#iframe2945").height($("#iframe2945").contents().find("body").height()+showittryitheight);
});
$("#iframe2945").height($("#iframe2945").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2945.focus();
editor2945.setSize(null, "250");
$("#rendering2945").hide();
$("#rendered2945").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 editor2945 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2945"), {
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);
}
}
});
editor2945.on("change",function(doc){
if(!binded2945){
$(window).bind('beforeunload',function(){
binded2945 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2945 = newCode;
$("textarea#stepcodeTextarea2945").val(newCode);
if(alreadyWriteCode2945!=code2945){
lastModifedTime2945 = new Date().getTime();
$("#rendering2945").show();
$("#rendered2945").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2945 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2945.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2945").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2946"].document.write(decodeHtml($("textarea#stepcodeTextarea2946").val()));
window.frames["iframe_show2946"].document.close();
$(window.frames["iframe_show2946"]).load(function(){
$("#iframe_show2946").height($("#iframe_show2946").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2946").height($("#iframe_show2946").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<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>
<ul class="nav nav-pills">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
<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>
<ul class="nav nav-pills">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
");
window.frames["iframe2946"].document.write(decodeHtml(code2946));
window.frames["iframe2946"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2946"]).load(function(){
$("#iframe2946").height($("#iframe2946").contents().find("body").height()+showittryitheight);
});
$("#iframe2946").height($("#iframe2946").contents().find("body").height()+showittryitheight);
alreadyWriteCode2946 = code2946;
$("#rendering2946").hide();
$("#rendered2946").show();
}
var tRereshRetry2DemoPanel2946 = setInterval(rereshRetry2DemoPanel2946,1000);
var binded2946 = false;
$("textarea#stepcodeTextarea2946").keyup(function(){
if(!binded2946){
$(window).bind('beforeunload',function(){
binded2946 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2946 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2946!=newCode){
// window.frames["iframe2946"].document.write("
");
// window.frames["iframe2946"].document.write(decodeHtml($("textarea#stepcodeTextarea2946").val()));
// window.frames["iframe2946"].document.close();
// $(window.frames["iframe2946"]).load(function(){
// $("#iframe2946").height($("#iframe2946").contents().find("body").height()+showittryitheight);
// });
// code2946 = newCode;
// }
});
$(".tryButton2946").click(function(){
$("#tryDiv2946").show();
$("#stepcodeTextarea2946").focus();
$("#stepcodeTextarea2946").height(200);
$("#iframe2946").height(0);
window.frames["iframe2946"].document.write("
");
window.frames["iframe2946"].document.write(decodeHtml($("textarea#stepcodeTextarea2946").val()));
window.frames["iframe2946"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2946"]).load(function(){
$("#iframe2946").height($("#iframe2946").contents().find("body").height()+showittryitheight);
});
$("#iframe2946").height($("#iframe2946").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2946.focus();
editor2946.setSize(null, "250");
$("#rendering2946").hide();
$("#rendered2946").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 editor2946 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2946"), {
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);
}
}
});
editor2946.on("change",function(doc){
if(!binded2946){
$(window).bind('beforeunload',function(){
binded2946 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2946 = newCode;
$("textarea#stepcodeTextarea2946").val(newCode);
if(alreadyWriteCode2946!=code2946){
lastModifedTime2946 = new Date().getTime();
$("#rendering2946").show();
$("#rendered2946").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2946 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2946.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2946").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2947"].document.write(decodeHtml($("textarea#stepcodeTextarea2947").val()));
window.frames["iframe_show2947"].document.close();
$(window.frames["iframe_show2947"]).load(function(){
$("#iframe_show2947").height($("#iframe_show2947").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2947").height($("#iframe_show2947").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<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>
<ul class="nav nav-pills nav-stacked" style="width:100px">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
<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>
<ul class="nav nav-pills nav-stacked" style="width:100px">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation"><a href="#">Android</a></li>
</ul>
");
window.frames["iframe2947"].document.write(decodeHtml(code2947));
window.frames["iframe2947"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2947"]).load(function(){
$("#iframe2947").height($("#iframe2947").contents().find("body").height()+showittryitheight);
});
$("#iframe2947").height($("#iframe2947").contents().find("body").height()+showittryitheight);
alreadyWriteCode2947 = code2947;
$("#rendering2947").hide();
$("#rendered2947").show();
}
var tRereshRetry2DemoPanel2947 = setInterval(rereshRetry2DemoPanel2947,1000);
var binded2947 = false;
$("textarea#stepcodeTextarea2947").keyup(function(){
if(!binded2947){
$(window).bind('beforeunload',function(){
binded2947 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2947 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2947!=newCode){
// window.frames["iframe2947"].document.write("
");
// window.frames["iframe2947"].document.write(decodeHtml($("textarea#stepcodeTextarea2947").val()));
// window.frames["iframe2947"].document.close();
// $(window.frames["iframe2947"]).load(function(){
// $("#iframe2947").height($("#iframe2947").contents().find("body").height()+showittryitheight);
// });
// code2947 = newCode;
// }
});
$(".tryButton2947").click(function(){
$("#tryDiv2947").show();
$("#stepcodeTextarea2947").focus();
$("#stepcodeTextarea2947").height(200);
$("#iframe2947").height(0);
window.frames["iframe2947"].document.write("
");
window.frames["iframe2947"].document.write(decodeHtml($("textarea#stepcodeTextarea2947").val()));
window.frames["iframe2947"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2947"]).load(function(){
$("#iframe2947").height($("#iframe2947").contents().find("body").height()+showittryitheight);
});
$("#iframe2947").height($("#iframe2947").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2947.focus();
editor2947.setSize(null, "250");
$("#rendering2947").hide();
$("#rendered2947").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 editor2947 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2947"), {
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);
}
}
});
editor2947.on("change",function(doc){
if(!binded2947){
$(window).bind('beforeunload',function(){
binded2947 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2947 = newCode;
$("textarea#stepcodeTextarea2947").val(newCode);
if(alreadyWriteCode2947!=code2947){
lastModifedTime2947 = new Date().getTime();
$("#rendering2947").show();
$("#rendered2947").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2947 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2947.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2947").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
");
window.frames["iframe_show2948"].document.write(decodeHtml($("textarea#stepcodeTextarea2948").val()));
window.frames["iframe_show2948"].document.close();
$(window.frames["iframe_show2948"]).load(function(){
$("#iframe_show2948").height($("#iframe_show2948").contents().find("body").height()+showittryitheight);
});
$("#iframe_show2948").height($("#iframe_show2948").contents().find("body").height()+showittryitheight);
setTimeout(function(){
},500);
});
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation" ><a href="#">Android</a></li>
<li role="presentation" class="disabled" ><a href="#">TokyoHot</a></li>
</ul>
<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>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Java</a></li>
<li role="presentation"><a href="#">IOS</a></li>
<li role="presentation" ><a href="#">Android</a></li>
<li role="presentation" class="disabled" ><a href="#">TokyoHot</a></li>
</ul>
");
window.frames["iframe2948"].document.write(decodeHtml(code2948));
window.frames["iframe2948"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2948"]).load(function(){
$("#iframe2948").height($("#iframe2948").contents().find("body").height()+showittryitheight);
});
$("#iframe2948").height($("#iframe2948").contents().find("body").height()+showittryitheight);
alreadyWriteCode2948 = code2948;
$("#rendering2948").hide();
$("#rendered2948").show();
}
var tRereshRetry2DemoPanel2948 = setInterval(rereshRetry2DemoPanel2948,1000);
var binded2948 = false;
$("textarea#stepcodeTextarea2948").keyup(function(){
if(!binded2948){
$(window).bind('beforeunload',function(){
binded2948 = true;
return "xxxx";
});
}
var newCode = $(this).val()
code2948 = newCode;
/*below code is replaced by function rereshRetry2DemoPanel()*/
// if(code2948!=newCode){
// window.frames["iframe2948"].document.write("
");
// window.frames["iframe2948"].document.write(decodeHtml($("textarea#stepcodeTextarea2948").val()));
// window.frames["iframe2948"].document.close();
// $(window.frames["iframe2948"]).load(function(){
// $("#iframe2948").height($("#iframe2948").contents().find("body").height()+showittryitheight);
// });
// code2948 = newCode;
// }
});
$(".tryButton2948").click(function(){
$("#tryDiv2948").show();
$("#stepcodeTextarea2948").focus();
$("#stepcodeTextarea2948").height(200);
$("#iframe2948").height(0);
window.frames["iframe2948"].document.write("
");
window.frames["iframe2948"].document.write(decodeHtml($("textarea#stepcodeTextarea2948").val()));
window.frames["iframe2948"].document.close();
//load和下面的非load必需并存,因为如果代码用到了jquery就必须使用load的方式
$(window.frames["iframe2948"]).load(function(){
$("#iframe2948").height($("#iframe2948").contents().find("body").height()+showittryitheight);
});
$("#iframe2948").height($("#iframe2948").contents().find("body").height()+showittryitheight);
this.scrollIntoView(true);
editor2948.focus();
editor2948.setSize(null, "250");
$("#rendering2948").hide();
$("#rendered2948").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 editor2948 = CodeMirror.fromTextArea(document.getElementById("stepcodeTextarea2948"), {
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);
}
}
});
editor2948.on("change",function(doc){
if(!binded2948){
$(window).bind('beforeunload',function(){
binded2948 = true;
return "xxxx";
});
}
var newCode = doc.getValue();
code2948 = newCode;
$("textarea#stepcodeTextarea2948").val(newCode);
if(alreadyWriteCode2948!=code2948){
lastModifedTime2948 = new Date().getTime();
$("#rendering2948").show();
$("#rendered2948").hide();
}
// alert(doc.getValue());
});
$(".CodeMirror").addClass("form-control");
// var editor2948 = CodeMirror.fromTextArea(, {
// lineNumbers: true,
// styleActiveLine: true,
// matchBrackets: true,
// theme:"eclipse",
// });
editor2948.on("change",function(doc){
// alert(doc.getValue());
});
$("#tryDiv2948").hide();
});
$("div.codemirrorTips span").addClass("glyphicon glyphicon-asterisk");
1. 双击选中单词
2. 三击选中整行
3. CTRL+F 查找
4. F8 全屏编辑,再次点击恢复
|
渲染中
渲染完成
|
代码高亮插件双击即可选中,不过部分同学反应,通过代码高亮插件复制的代码无法在IDEA里正常显示,这里提供TEXTAREA的方式,方便复制,谢谢
1. 自行完成练习
根据练习目标尽量自己实现代码效果,期间会碰到疑问,难题,和自己不懂的地方,这些都是必要的过程
2. 带着疑问查看答案
完成过程中,碰到无法解决的问题,带着疑问,查看答案,分析答案的解决思路
3. 查看答案讲解视频
依然有不明白的地方,点开视频讲解,带着疑问,听视频讲解有问题的部分
4. 再做一遍
理解后,再从头做一遍,把有疑问的地方都捋清楚
5. 总结
最后再总结一遍,总结思路,总结解决办法,以后遇到类似的问题,怎么处理
HOW2J公众号,关注后实时获知布最新的教程和优惠活动,谢谢。
提问之前请登陆
|