chr(9)、chr(10)、chr(13)、chr(32)、chr(34)讲解(3)
)
Chr(10) 是个换行符
所有关于 ASCII码的表格:[url]http://www.asciitable.com./[/url]
<cfscript>
/**
* 一个增强版的文章段落格式化函数
* 使用) 替换TAB,支持多系统
* Rewrite and multiOS support by Nathan Dintenfas.
*
* @param string The string to format. (Required)
* @return Returns a string.
* @author Ben Forta ([email]ben@forta.com[/email])
* @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),"<br />","ALL");
}
</cfscript>
内容版权声明:除非注明,否则皆为本站原创文章。