- 时间:2020-03-07 11:58 编辑: 来源: 阅读:
- 扫一扫,手机访问
摘要:9个javascript语法高亮插件 推荐
下面介绍的是一些纯javascript实现的语法高亮插件。
英文原文:[url=http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/]http://www.webdesignbooth.com/9-useful-javascript-syntax-highlighting-scripts/[/url]
1. [url=http://alexgorbatchev.com/wiki/SyntaxHighlighter]SyntaxHighlighter[/url]
我相信这个插件是我们使用多的,它支持超多的语言,如果遇到不支持的语法还支持自定义。[img]http://files.jb51.net/upload/20090718023926217.png[/img]
2. [url=http://shjs.sourceforge.net/]SHJS[/url]
SHJS 是js语法高亮插件的代表,它支持很多编程语言,兼容Firefox 2 &3, IE 6 & 7, Opera 9.6, Safari 3.2 &Chrome 1.0。
[img]http://files.jb51.net/upload/20090718023927229.png[/img]
3. [url=http://startbigthinksmall.wordpress.com/2008/10/30/beautyofcode-jquery-plugin-for-syntax-highlighting/]beautyOfCode[/url]
beautyOfCode 是一个基于jQuery的语法高亮插件,使用了Alex Gorbatchev的语法高亮脚本使它更贴近 XHTML标准。
[img]http://files.jb51.net/upload/20090718023927211.png[/img]
4. [url=http://code.google.com/p/jquery-chili-js/]Chili[/url]
Chili is也是基于jQuery的语法高亮插件,支持很多语言并且带很多可配置项。[img]http://files.jb51.net/upload/20090718023927110.png[/img]
5. [url=http://pradador.com/code/lighterjs/]Lighter.js[/url]
Lighter.js是基于MooTools的免费语法高亮插件, 简单易用。[img]http://files.jb51.net/upload/20090718023928554.png[/img]
6. [url=http://softwaremaniacs.org/soft/highlight/en/]Highlight.js[/url]
highlight.js 同样是简单易用,支持多数语言,它有很多可以跟CMS、论坛和博客整合的插件。[img]http://files.jb51.net/upload/20090718023928608.png[/img]
7. [url=http://mihai.bazon.net/projects/javascript-syntax-highlighting-engine]DlHighlight[/url]
DlHighlight是一款比较简单的高亮插件,仅支持JavaScript, CSS, XML, HTML。[img]http://files.jb51.net/upload/20090718023928864.png[/img]
8. [url=http://code.google.com/p/google-code-prettify/]Google Code Prettify[/url]
Google Code Prettify是谷歌出品的语法高亮插件,可以高亮html页面中的部分代码片段。[img]http://files.jb51.net/upload/20090718023929871.png[/img]
9. [url=http://plugins.jquery.com/project/JUSH]JUSH[/url]
JUSH是另外一个 jQuery语法高亮插件 ,支持HTML, CSS, PHP, PY 和 SQL。
[img]http://files.jb51.net/upload/20090718023929270.png[/img]