Home > php教程 > php手册 > 给你的文章页加上代码高亮显示

给你的文章页加上代码高亮显示

WBOY
Release: 2016-06-07 11:43:24
Original
1328 people have browsed it

SyntaxHighlighter 是让你的文章展示页中的代码高亮的一组js插件
代码使用说明
1. js<script></script><br> <script></script><br> <script></script><br> <script></script><br> <script></script><br> <script></script><br> <script></script><br> <script><br /> SyntaxHighlighter.config.clipboardSwf = &#039;Scripts/clipboard.swf&#039;;<br /> SyntaxHighlighter.all();<br /> </script>2. css<link> <br> <link>3. html<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">&lt;br&gt; // PHP示例&lt;br&gt; echo 'hellooo';&lt;br&gt; function test(){&lt;br&gt;     return 123;&lt;br&gt; }&lt;br&gt; </pre><div class="contentsignin">Copy after login</div></div> <br> <br> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">&lt;br&gt; /*CSS示例*/&lt;br&gt; a{text-align:center;}&lt;br&gt; </pre><div class="contentsignin">Copy after login</div></div> <br> <br> <br> <div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false">&lt;br&gt; // JS示例&lt;br&gt; document.getElementById(&quot;hhhhh&quot;).value = 'hellooo';&lt;br&gt; document.writeln('hellooo');&lt;br&gt; </pre><div class="contentsignin">Copy after login</div></div>插件效果:
给你的文章页加上代码高亮显示

下载地址:
http://chajiandaquan.com/plugin/view/id/121.html

AD:真正免费,域名+虚机+企业邮箱=0元

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template