一区二区久久-一区二区三区www-一区二区三区久久-一区二区三区久久精品-麻豆国产一区二区在线观看-麻豆国产视频

syntaxhighlighter 使用方法

Placing the code

Place your code on the page and surround it with <pre> tag. Set name attribute to code and class attribute to one of the language aliases you wish to use.

<pre name="code" class="c-sharp">... some code here ...</pre>

NOTE: One important thing to watch out for is opening triangular bracket <. It must be replaced with an HTML equivalent of < in all cases. Failure to do won't break the page, but might break the source code displayed.

An alternative to <pre> is to use <textarea> tag. There are no problems with < character in that case. The main problem is that it doesn't look as good as <pre> tag if for some reason JavaScript didn't work (in RSS feed for example).

<textarea name="code" class="c#" cols="60" rows="10">... some code here ...</textarea>

Extended configuration

There's a way to pass a few configuration options to the code block. It's done via colon separated arguments.

<pre name="code" class="html:collapse">... some code here ...</pre>

Making it work

Finally, to get the whole thing to render properly on the page, you have to add JavaScript to the page.

<link type="text/css" rel="stylesheet" href="css/SyntaxHighlighter.css"></link><script language="Javascript" src="js/shCore.js"></script><script language="Javascript" src="js/shBrushCSharp.js"></script><script language="Javascript" src="js/shBrushXml.js"></script><script language="Javascript">dp.SyntaxHighlighter.ClipboardSwf = '/flash/clipboard.swf';dp.SyntaxHighlighter.HighlightAll('code');</script>

For optimal result, place this code at the very end of your page. Check HighlightAll for more details about the function.

下載地址:SyntaxHighlighter_1.5.0.zip

JavaScript技術(shù)syntaxhighlighter 使用方法,轉(zhuǎn)載需保留來源!

鄭重聲明:本文版權(quán)歸原作者所有,轉(zhuǎn)載文章僅為傳播更多信息之目的,如作者信息標(biāo)記有誤,請第一時(shí)間聯(lián)系我們修改或刪除,多謝。

主站蜘蛛池模板: 国产午夜精品福利久久 | 极品美女一级毛片免费 | 午夜爽视频 | 国产精品久久久久毛片真精品 | 六月婷婷网视频在线观看 | 激情婷婷丁香 | 午夜精品免费 | 91色网站| 色多多视频官网 | 91香蕉国产亚洲一区二区三区 | 色哟哟在线免费观看 | 一区二区三区四区在线 | 国产精品一区二区在线观看 | 色哟哟在线观看视频高清大全 | 91精品福利一区二区 | 欧美另类娇小 | 美女视频黄视大全视频免费的 | 国产美女免费观看 | 成人福利网站在线看视频 | 久久精品5 | 日韩欧美91| 国产视频一区二 | 国内精品视频在线播放一区 | 一二三四视频社区在线中文 | 国产亚洲漂亮白嫩美女在线 | 久久九九视频 | 国产精品成人观看视频免费 | 伊人久久大香网 | 天天干精品 | 久久综合一区 | 欧美激情视频网站 | 欧美日韩国产亚洲综合不卡 | 看5xxaaa免费毛片 | 91麻豆影视| 涩视频成人永久免费观看网站 | 色悠综合 | 成人在线免费观看视频 | 天天做天天玩天天爽天天 | 欧美另类videosgrstv变态 欧美另类xxx | 国产精品手机在线 | 亚洲天堂视频在线观看 |