how2j.cn

"); 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 : 面板颜色   

示例 1 :

基本面板

基本面板
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
示例 2 :

面板标题

面板标题
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
示例 3 :

面板脚注

面板脚注
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
示例 4 :

面板颜色

面板颜色
"); 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>
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果


HOW2J公众号,关注后实时获知布最新的教程和优惠活动,谢谢。


关于 前端部分-BootStrap-面板 的提问

尽量提供截图代码异常信息,有助于分析和解决问题。 也可进本站QQ群交流: 620943819
提问尽量提供完整的代码,环境描述,越是有利于问题的重现,您的问题越能更快得到解答。
对教程中代码有疑问,请提供是哪个步骤,哪一行有疑问,这样便于快速定位问题,提高问题得到解答的速度
在已经存在的几千个提问里,有相当大的比例,是因为使用了和站长不同版本的开发环境导致的,比如 jdk, eclpise, idea, mysql,tomcat 等等软件的版本不一致。
请使用和站长一样的版本,可以节约自己大量的学习时间。 站长把教学中用的软件版本整理了,都统一放在了这里, 方便大家下载: http://how2j.cn/k/helloworld/helloworld-version/1718.html

上传截图