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 = 'Scripts/clipboard.swf';<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"><br>
// PHP示例<br>
echo 'hellooo';<br>
function test(){<br>
return 123;<br>
}<br>
</pre><div class="contentsignin">登录后复制</div></div>
<br>
<br>
<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><br>
/*CSS示例*/<br>
a{text-align:center;}<br>
</pre><div class="contentsignin">登录后复制</div></div>
<br>
<br>
<br>
<div class="code" style="position:relative; padding:0px; margin:0px;"><pre class="brush:php;toolbar:false"><br>
// JS示例<br>
document.getElementById("hhhhh").value = 'hellooo';<br>
document.writeln('hellooo');<br>
</pre><div class="contentsignin">登录后复制</div></div>
插件效果:
下载地址:
http://chajiandaquan.com/plugin/view/id/121.html
AD:真正免费,域名+虚机+企业邮箱=0元