朋友多了,寂寞卻沒少,朋友沒有了你,得到了天下最高的技術又能如何?人類的全部才能無非是時間和耐心的混合物.---巴尔扎克
代码如下: <HTML> <HEAD> <TITLE>加亮显示</TITLE> <style> * {font-size: 14px} </style> <script language="JScript"> function highLight_attribute($1) { var attribute_html = $1 var re = /([\S]+=)(\S+)/g attribute_html = attribute_html.replace(re, "<font color=red>$1</font><font color=black>$2</font>") return attribute_html } function highLight_tag($1) { return "<font color=blue>"+highLight_attribute($1)+"</font>" } function highLight(html) { re = /(<[\S]+?.*?>)/g html = html.replace(re, highLight_tag) html = html.replace(/\n/g, "<br>") html = html.replace(/(\$?\d+(%|px)?)/g, "<font color=red>$1</font>") html = html.replace(/(\".*?\")/g, function($1) { $1 = $1.replace(/<.*?>/g, "") return "<font color=#999999>"+$1+"</font>" }) html_lightcode.innerHTML = html } </script> </HEAD> <BODY onload="html_code.innerText=document.documentElement.outerHTML; highLight(html_code.innerHTML)"> <textarea id=html_code rows=15 style="width:100%" onkeyup="highLight(html_code.innerHTML)"></textarea> <br> <div id=html_lightcode></div> </BODY> </HTML> [Ctrl+A 全选 提示:你可先修改部分代码,再点运行代码]
青苹果Web应用商店 https://webapp.taobao.com/
PHP/ASP.NET/ASP/UCHOME/DISCUZ! X系列网站开发,详细需求联系QQ:8511978
posted on 2005-04-03 00:22 ξσ Dicky σξ 阅读(704) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 ξσ Dicky σξ Powered by .NET 8.0 on Kubernetes