Home > Web Front-end > JS Tutorial > Instructions for using the SyntaxHighlighter syntax highlighting plug-in_javascript skills

Instructions for using the SyntaxHighlighter syntax highlighting plug-in_javascript skills

WBOY
Release: 2016-05-16 18:03:23
Original
1444 people have browsed it

javascript syntax highlighting

Copy code The code is as follows:

(function(){
var el=document.getElementById("img");
var doc=document.documentElement,docBody=document.body;
var oldY=(doc.scrollTop || docBody.scrollTop) (doc.clientHeight/2 || docBody.clientHeight/2);
(function(){
var nowY=(doc.scrollTop || docBody.scrollTop) (doc.clientHeight/2 || docBody.clientHeight/2);
oldY =(nowY-oldY)/10;
el.style.top=Math.ceil(oldY-el.offsetHeight/2) "px";
setTimeout(arguments.callee,25);
})();
})()

CSS syntax highlighting
Copy code The code is as follows:

.hello{margin:0;padding:0;}
div{width:980px;}

PHP syntax highlighting
Copy code The code is as follows:

$tomorrow = mktime(0,0,0,date( "m"),date("d") 1,date("Y"));
echo "Tomorrow is ".date("Y/m/d", $tomorrow);

Other languages. . .
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template