[Your IP: 54.164.198.240]
Logowanie

Język: PL EN

KySoft Systemy Informatyczne


sitemap

PHP/HTML tips & tricks

email-validator
html-entities
http-build-str
inline-sms-orange
inline-youtube
mathjax-equations
rss-howto
skype-hidden-emots
syntax-highlight
text-highlight
world-flags
(currently only in english)
Syntax highlight (javascript) SHJS
Supports many languages, extendable, client-side javascript (does not overload the server).

1. in HEAD section of HTML place sh_main.js and preffered css file
  <script type="text/javascript" src="shjs/sh_main.js"></script>
  <link type="text/css" rel="stylesheet" href="shjs/sh_typical.css">

2. in BODY tag add onload property
<body onload="sh_highlightDocument('shjs/lang/','.js');">

3. then to highlight syntax place code in PRE tags
<pre class="sh_php">
function toString($arg){
	if (is_array($arg)) return implode(":",$a);
	return $arg;	
}
</pre>
and it will be seen as
function toString($arg){
	if (is_array($arg)) return implode(":",$a);
	return $arg;
}
Note: you have to remeber to change all < > to '&lt;' '&gt;' inside PRE tags

Dodaj komentarz