JS 代码高亮加复制代码
<!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>
相关推荐
88274956 2020-11-03
runner 2020-09-01
梦的天空 2020-08-25
移动开发与培训 2020-08-16
ReunionIsland 2020-08-16
lyqdanang 2020-08-16
MyNameIsXiaoLai 2020-07-08
星辰的笔记 2020-07-04
csstpeixun 2020-06-28
letheashura 2020-06-26
liaoxuewu 2020-06-26
sunzhihaofuture 2020-06-21
FEvivi 2020-06-16
坚持着执着 2020-06-16
waterv 2020-06-14
xiaoge00 2020-06-14
firejq 2020-06-14
firstboy0 2020-06-14
e度空间 2020-06-12
zhongweinan 2020-06-10