推荐一款代码高亮插件:SyntaxHighlighter ,也就是我博客现在所使用的代码高亮插件。
官方网站:http://code.google.com/p/syntaxhighlighter/
SyntaxHighlighter_1.5.0.zip |
使用方法如下(顺便可以看下效果):
<html> <head> <!--css for code highlight begin,SyntaxHighlighter--> <link type="text/css" rel="stylesheet" href="highlighter/css/SyntaxHighlighter.css"></link> <!--css for code highlight begin--> </head> <body> <pre name="code" class="c"> int main() { return 0; } </pre> <!--js for code highlight begin,SyntaxHighlighter--> <script class="javascript" src="highlighter/js/shCore.js"></script> <script class="javascript" src="highlighter/js/shBrushCSharp.js"></script> <script class="javascript" src="highlighter/js/shBrushPhp.js"></script> <script class="javascript" src="highlighter/js/shBrushJScript.js"></script> <script class="javascript" src="highlighter/js/shBrushJava.js"></script> <script class="javascript" src="highlighter/js/shBrushVb.js"></script> <script class="javascript" src="highlighter/js/shBrushSql.js"></script> <script class="javascript" src="highlighter/js/shBrushXml.js"></script> <script class="javascript" src="highlighter/js/shBrushDelphi.js"></script> <script class="javascript" src="highlighter/js/shBrushPython.js"></script> <script class="javascript" src="highlighter/js/shBrushRuby.js"></script> <script class="javascript" src="highlighter/js/shBrushCss.js"></script> <script class="javascript" src="highlighter/js/shBrushCpp.js"></script> <script class="javascript"> dp.SyntaxHighlighter.ClipboardSwf = 'highlighter/flash/clipboard.swf'; dp.SyntaxHighlighter.HighlightAll('code'); </script> <!--js for code highlight end--> </body> </html>
SyntaxHighlighter支持的语言别名表:
Language | Aliases |
C++ | cpp, c, c++ |
C# | c#, c-sharp, csharp |
CSS | css |
Delphi | delphi, pascal |
Java | java |
Java Script | js, jscript, javascript |
PHP | php |
Python | py, python |
Ruby | rb, ruby, rails, ror |
Sql | sql |
VB | vb, vb.net |
XML/HTML | xml, html, xhtml, xslt |
呵呵,谢谢
VaTG790i.最好的<a href=http://www.kyfei.com>网站推广软件</a>,
非常好
....................
;ui;普i;uighur;ui;ui;个
在unix网络编程中看到了关于TCP/IP的一些内容,我感觉还是写的不够。正在下载中,一定
下载地址呢