Syntax Highlight > php

본문 바로가기

php

Syntax Highlight

작성일 18-08-17 12:54

페이지 정보

작성자서방님 조회 172회 댓글 0건

본문

<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css">
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
<script>
function sh(id) {
 var $id = $("#" + id);
 if ($id.length > 0) {
 var html = $id.html();
 html = html.split("[code]").join("<pre><code>");
 html = html.split("[/code]").join("</pre></code>");

 $id.html(html);
 $id.find("pre>code").each(function() {
 var text = $.trim($(this).text());
 $(this).text(text);
 });
 }
}

$(function() { sh("bo_v_con"); });
</script>

댓글목록

등록된 댓글이 없습니다.

전체 612건 10 페이지
게시물 검색
Copyright © 서방님.kr All rights reserved.
PC 버전으로 보기