萬盛學電腦網

 萬盛學電腦網 >> 腳本專題 >> javascript >> js動態為代碼著色顯示行號

js動態為代碼著色顯示行號

 以下是代碼:

 代碼如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Javascript代碼高亮著色顯行號-柯樂義</title> <script type="text/javascript" src="http://www.keleyi.com/keleyi/phtml/codecolor/a/scripts/shCore.js"></script> <script type="text/javascript" src="http://www.keleyi.com/keleyi/phtml/codecolor/a/scripts/shBrushJScript.js"></script> <link type="text/css" rel="stylesheet" href="http://www.keleyi.com/keleyi/phtml/codecolor/a/styles/shCoreDefault.css"/> <script type="text/javascript">SyntaxHighlighter.all();</script> </head> <body style="background: white; font-family: Helvetica"> <h1>Javascript代碼高亮著色顯行號</h1> <pre class="brush: js;"> function KeleyiColor() { document.write('keleyi.com'); return "hi!"; } </pre> </body> </html>    
copyright © 萬盛學電腦網 all rights reserved