艺术迷网
艺术迷 >> 网页设计 >> 其它教程 >> 什么是chr(13) chr(10)
2006-10-21   作者:佚名   来源:互联网   点击:5199
页面功能: 【评论】有错就点】 【字体: 】 【打印】 【关闭【收藏本页】收藏到365Key
 
chr(13) 是一个回车

例子:把所有回车符替换为

Replace(foo‚ Chr(13)‚ ""‚ "ALL")

Chr(10) 是个换行符

/**

* 一个增强版的文章段落格式化函数

* 使用) 替换TAB,支持多系统

* Rewrite and multiOS support by Nathan Dintenfas.

*

* @param string The string to format. (Required)

* @return Returns a string.

* @author Ben Forta (ben@forta.com)

* @version 3‚ June 26‚ 2002

*/

function Paragrap1hFormat2(str) {

//first make Windows style into Unix style

str = replace(str‚chr(13)&chr(10)‚chr(10)‚"ALL");

//now make Macintosh style into Unix style

str = replace(str‚chr(13)‚chr(10)‚"ALL");

//now fix tabs

str = replace(str‚chr(9)‚" "‚"ALL");

//now return the text formatted in HTML

return replace(str‚chr(10)‚"

"‚"ALL");

}


声明:本站刊载此文不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。如有疑问请与站长联系。
网友评论
目前没有评论!
发表评论
您的姓名: 匿名发送
电子邮件:
评论内容:
不能超过100个字符



所有留言只代表网友个人观点,不代表本站观点。
请各位遵纪守法并注意语言文明。
新闻搜索
关 键 词:
搜索范围:
全站精华
图文精彩