html代码高亮js

效果图:

html代码:

    <!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>RunJS</title>
        <script class="jquery library" src="./jquery-1.8.3.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="./brush.js"></script>
<link type="text/css" rel="stylesheet" href="./shCore.css"/>
<link type="text/css" rel="stylesheet" href="./shThemeDefault.css"/>
    </head>
    <body>
    <h1>
      代码高亮演示 SyntaxHighlighter
    </h1>
        <pre class='brush: java'>
    @Override
    public void init(FilterConfig cfg) throws ServletException {
        super.init(cfg);
        OnlineUserManager.init();
        //this._dataInit();
    }

      </pre>
    </body>
</html>
        <style>body {background:#fff;}</style>
                <script>$(document).ready(function(){
    SyntaxHighlighter.config.clipboardSwf = './clipboard.swf';
    SyntaxHighlighter.all();
});</script>