SyntaxHighlighter is probably the most popular. But you have a choice, check out 16 free Javascript code syntax shortcuts for better programming
If you mean real-time syntax syntax, you can also try JS-CodeEdit :
JS-CodeEdit is a JavaScript editor that converts your HTML text fields into a code editor with real-time syntax highlighting . If you added to the form, the content may be submitted, for example. to write to a file. The good thing is that you can add as many editors as you want in the HTML page.
But it supports a slightly limited list of languages: JavaScript, PHP, Perl, HTML, CSS, XML, SQL (this list grows with each version).
Maxym source share