iamrunner 2016-08-30
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>无标题文档</title> <script type="text/javascript" src="syntaxhighlighter/scripts/shCore.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJava.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushPhp.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushPlain.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushRuby.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushSql.js"></script> <link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shCore.css"/> <link type="text/css" rel="stylesheet" href="syntaxhighlighter/styles/shThemeDefault.css"/> <script type="text/javascript"> SyntaxHighlighter.config.clipboardSwf = 'syntaxhighlighter/scripts/clipboard.swf'; SyntaxHighlighter.all(); </script> </head> <body> <pre class="brush:html;"> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no"> <title>新建H5模板</title> <style type="text/css"> body{ font-family:\5FAE\8F6F\96C5\9ED1,'Arial'; color:#5b5b5b; background-color:#fff; font-size:14px; overflow-x:hidden;} a{ color:#333; text-decoration:none;} a:hover{ color:#333; text-decoration:none;} img{ border:none;} i,em{ font-style:normal;} li{ list-style-type:none;} textarea{ resize:vertical;} input, select, textarea{ font-family:\5FAE\8F6F\96C5\9ED1,'Arial'; background-color:#fff margin:0; padding:0; outline:none;} </style> </head> <body> <h3>阅谁问君诵,水落清香浮</h3> <script type="text/javascript"> alert("测试吧"); </script> </body> </html> </pre> </body> </html>
效果图:
PS:可以把如下的JS整合成一条JS,再压缩就可以减少响应量和文件大小,加快页面的访问速度。
<script type="text/javascript" src="syntaxhighlighter/scripts/shBrushCss.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJScript.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushJava.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushPhp.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushPlain.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushRuby.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushXml.js"></script> <script type="text/javascript" src="syntaxhighlighter/scripts/shBrushSql.js"></script>