主题:  什么是chr(13) chr(10) chr(9)....

s22

职务:版主
等级:4
金币:10.0
发贴:1634
#12003/12/23 12:56:54
chr(13) 是一个回车
(
例子:把所有回车符替换为<br/>
#Replace(foo, Chr(13), "<br />", "ALL")#


)

Chr(10) 是个换行符

所有关于 ASCII码的表格:http://www.asciitable.com./

<cfscript>
/**
* 一个增强版的文章段落格式化函数
* 使用)&nbsp;替换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),"&nbsp;&nbsp;&nbsp;","ALL");
//now return the text formatted in HTML
return replace(str,chr(10),"<br />","ALL");
}
</cfscript>



woogia

职务:普通成员
等级:1
金币:0.0
发贴:202
#22005/10/27 23:05:31
是把备注字段里的内容输出为网页用的吧.



xtvge2005

职务:普通成员
等级:1
金币:0.0
发贴:94
#32005/12/14 13:16:13
乱码???????????

怎么都是英文的