We can use code SyntaxHighlighter for syntax highlighting in our WordPress blog, unlike other plugins, SyntaxHighlighter is simple and easy to use, it support the common languages such as JavaScript, HTML, PHP and C++. You can download this plugin here: SyntaxHighlighter plugin for WordPress, or view the wiki.
SyntaxHighlighter is very easy to use, you had better visit the official site to know how to use it. You can view the JavaScript demo below.
var txt=""
function message()
{
try
{
adddlert("Welcome guest!")
}
catch(err)
{
txt="Error.\n\n"
txt+="Error Description:" + err.description + "\n\n"
txt+="Clcik to continue\n\n"
alert(txt)
}
}