我只是按照这里的说明进行操作,它没有任何帮助吗?
<script type="text/javascript" src="sh/src/shCore.js"></script>
<script type="text/javascript" src="sh/scripts/shBrushJScript.js"></script>
<link href="sh/styles/shCore.css" rel="stylesheet" type="text/css" />
<!--<link href="sh/styles/shCoreDefault.css" rel="stylesheet" type="text/css" />-->
<link href="sh/styles/shThemeDefault.css" rel="stylesheet" type="text/css" />
<pre class="brush: js">
/**
* SyntaxHighlighter
*/
function foo()
{
if (counter <= 10)
return;
// it works!
}
</pre>
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
在控制台中发现一些错误,不知道与它有关。
Uncaught ReferenceError: XRegExp is not defined shCore.js:123 Uncaught TypeError: Cannot read property 'Highlighter' of undefined shBrushJScript.js:45 Uncaught TypeError: Cannot read property 'all' of undefined test.php:21 Attr.specified 已弃用。它的价值永远是真实的。