项目中引入 两个文件夹
head 中 加入
<!-- SyntaxHighlighter start-->
<!-- Include required JS files -->
<script type="text/javascript" src="../js/scripts/shCore.js"></script>
<!--
At least one brush, here we choose JS. You need to include a brush for every
language you want to highlight
-->
<script type="text/javascript" src="../js/scripts/shBrushJScript.js"></script>
<script type="text/javascript" src="../js/scripts/shBrushXml.js"></script>
<!-- Include *at least* the core style and default theme -->
<link href="../css/styles/shCore.css" rel="stylesheet" type="text/css" />
<link href="../css/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
<!--SyntaxHighlighter end -->
代码中 可以写用于高亮的 东西
<preclass="brush: xml">
要高亮显示的东西
</pre>
下载:http://alexgorbatchev.com/SyntaxHighlighter/download/