我的HTML Tidy 配置
HTML Tidy Configuration Options
我们现在的网站大部分都是HTML的,如果希望将它们标准化,手工的一页一页修改非常麻烦。如果有一个工具能自动将HTML转换成符合标准的XHTML就好了。其实在这方面已经有许多商业和免费的工具软件可以使用,这里将要介绍的HTML Tidy 就是一个很基本但很有用的工具,它可以运行在多种平台上,而且是开放源代码的。
HTML Tidy 是一个能够HTML文件的错误及整齐的排列代码(即缩排)的软件及函式库。
HTML Tidy 是由W3C的Dave Raggett开发,其后成为一个Sourceforge的专案,其源码是使用ANSI C写成,而适用于不同操作系统的执行档则可因此而编译而成。而HTML Tidy是根据W3C license(宽松的BSD许可证)授权下发布。
修正HTML错误如:
遗漏元素结束标签或错配元素标签
补回遗漏的项目(例如一些元素标签,引号等...)
回报文件是否使用私有的HTML元素或扩展
根据预先设定的风格改变排版
将某些编码的字符转换至HTML字符编码
清理呈现式元素
[myFormat]
add-xml-decl=no
add-xml-space=no
alt-text=
assume-xml-procins=no
bare=no
break-before-br=no
clean=no
doctype=auto
drop-empty-paras=yes
drop-font-tags=yes
drop-proprietary-attributes=no
enclose-block-text=yes
enclose-text=yes
escape-cdata=no
fix-bad-comments=yes
fix-uri=yes
hide-comments=no
hide-endtags=no
indent-cdata=no
input-xml=no
join-classes=no
join-styles=yes
logical-emphasis=yes
lower-literals=yes
ncr=yes
new-blocklevel-tags=
new-empty-tags=
new-inline-tags=
new-pre-tags=
numeric-entities=no
output-xhtml=no
output-xml=no
quote-ampersand=no
quote-marks=no
quote-nbsp=no
repeated-attributes=keep-last
replace-color=no
show-body-only=no
uppercase-attributes=no
uppercase-tags=no
word-2000=no
show-errors=6
show-warnings=yes
indent=auto
indent-attributes=no
indent-spaces=2
literal-attributes=no
markup=yes
tab-size=4
wrap=100
wrap-asp=yes
wrap-attributes=no
wrap-jste=yes
wrap-php=yes
wrap-script-literals=no
wrap-sections=yes
ascii-chars=no
char-encoding=raw
input-encoding=
language=
output-bom=auto
output-encoding=
newline=
fix-backslash=yes
force-output=no
gnu-emacs=no
quiet=no
相关文档:
一、字符串分割分析法。
这里是一个获取URL带QUESTRING参数的JAVASCRIPT客户端解决方案,相当于asp的request.querystring,PHP的$_GET
函数:
<Script language="javascript">
function GetRequest() {
var url = location.search; //获取url中"?"符后的字串
var theRequest = ne ......
Windows XP下恢复html,mht和mhtml文件的默认图标
由于电驴偷偷安装了遨游浏览器,致使html图标都变成了 遨游 的图标,看着很不顺眼,卸掉遨游,修改关联选项,发现不能恢复正常,一气之下,修改注册表!!!结果发现html文件现在什么图标都没了,虽然打开没问题但看上去太别扭了。郁闷,问题搞大了!
百度了一下,发 ......
Frame框架现已不怎么常用,给个例子以展示其属性。
frame例子:
<frameset cols="50%,*">
<noframes>
<body>
Sorry,your explorer doesn't support the frame...
</body>
</noframes>
<frame name="left" src="left.html">
<frameset rows="*,30%">
<frame name=" ......
前台脚本的元素自动下拉扩展:
具体是当鼠标放在一个元素上时,这个元素如果显示不全,就自动扩展,并且不会影响其它的元素.移开鼠标该元素自动还原成原来的样式.
在Coding 的过程中,一个跨Browser的问题是:
在每一次显示 float div前 ......
Public Function CHTMLEncode(ByVal fString As String) As String '=========数据库回车符和空格符转换=========
fString = Replace(fString, Chr(32), " ")
' fStr ......