Macromedia coldfusion 4.5-cfml language reference 用户手册
556
CFML Language Reference
WriteOutput
Appends text to the page output stream. Although you can call this function anywhere
within a page, it is most useful inside a CFSCRIPT block.
within a page, it is most useful inside a CFSCRIPT block.
Note
When within the CFQUERY and CFMAIL tags, the WriteOutput function
does not output to the current page, but instead writes to the current SQL
statement or mail text. Do not use WriteOutput within CFQUERY and
CFMAIL.
does not output to the current page, but instead writes to the current SQL
statement or mail text. Do not use WriteOutput within CFQUERY and
CFMAIL.
This function writes to the page output stream regardless of conditions established by
the
the
CFSETTING
tag.
Syntax
WriteOutput(
string
)
string
Text to be appended to the page output stream.
Examples
...
<CFSCRIPT>
employee=StructNew();
StructInsert(employee, "firstname", FORM.firstname);
StructInsert(employee, "lastname", FORM.lastname);
StructInsert(employee, "email", FORM.email);
StructInsert(employee, "phone", FORM.phone);
StructInsert(employee, "department", FORM.department);
WriteOutput("About to add " & FORM.firstname & " " &
<CFSCRIPT>
employee=StructNew();
StructInsert(employee, "firstname", FORM.firstname);
StructInsert(employee, "lastname", FORM.lastname);
StructInsert(employee, "email", FORM.email);
StructInsert(employee, "phone", FORM.phone);
StructInsert(employee, "department", FORM.department);
WriteOutput("About to add " & FORM.firstname & " " &
FORM.lastname);
</CFSCRIPT>
...
...