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)); });
效果 说明 示例代码
<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 : 禁用的链接   

示例 1 :

标签页

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

胶囊式标签页

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

垂直胶囊式标签页

垂直胶囊式标签页
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果
示例 4 :

禁用的链接

禁用的链接
"); 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 全屏编辑,再次点击恢复
渲染中 渲染完成
效果


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


关于 前端部分-BootStrap-导航栏 的提问

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

上传截图