![MACROMEDIA COLDFUSION 4.5-DEVELOPING WEB Скачать руководство пользователя страница 38](http://html1.mh-extra.com/html/macromedia/coldfusion-4-5-developing-web/coldfusion-4-5-developing-web_develop-manual_3286369038.webp)
12
Developing Web Applications with ColdFusion
Compare the code that was returned to the browser with what you originally
created. Notice that the ColdFusion comments and CFML tags are processed, but
do not appear in the HTML file that’s returned to the browser.
Code Review
The application page that you just created contains both HTML and CFML. You used
the CFML tag CFSET to define a variable, Department, and set its value to be "Sales."
You then used the CFML tag CFOUTPUT to display text and the value of the variable.
Original ColdFusion page
HTML file returned by Web server
<HTML>
<HEAD>
<TITLE>Call Department</TITLE>
</HEAD>
<BODY>
<STRONG>Call Department</STRONG>
<!--- Set all variables --->
<CFSET Department="Sales">
<CFOUTPUT>
I’d like to talk to someone in
#Department#.
<!--- Display results --->
</CFOUTPUT>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE>Call Department</TITLE>
</HEAD>
<BODY>
<STRONG>Call Department</STRONG>
I’d like to talk to someone in
Sales.
</BODY>
</HTML>
Code
Description
<!--- Set all variables --->
CFML comment, which is not returned in
the HTML page.
<CFSET Department="Sales">
Creates a variable named Department and
sets the value equal to Sales.
<!--- Display results --->
CFML comment, which is not returned in
the HTML page.
<CFOUTPUT>
I’d like to talk to someone in
#Department#.
</CFOUTPUT>
Displays whatever appears between the
opening and closing CFOUTPUT tags, in
this case the text "I’d like to talk to
someone in" followed by the value of the
variable Department, which is "Sales."
Содержание COLDFUSION 4.5-DEVELOPING WEB
Страница 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Страница 14: ...xiv Developing Web Applications with ColdFusion...
Страница 26: ...xxvi Developing Web Applications with ColdFusion...
Страница 34: ...8 Developing Web Applications with ColdFusion...
Страница 70: ...44 Developing Web Applications with ColdFusion...
Страница 84: ...58 Developing Web Applications with ColdFusion...
Страница 114: ...88 Developing Web Applications with ColdFusion...
Страница 148: ...122 Developing Web Applications with ColdFusion...
Страница 174: ...148 Developing Web Applications with ColdFusion...
Страница 208: ...182 Developing Web Applications with ColdFusion...
Страница 244: ...218 Developing Web Applications with ColdFusion...
Страница 274: ...248 Developing Web Applications with ColdFusion...
Страница 288: ...262 Developing Web Applications with ColdFusion...
Страница 300: ...274 Developing Web Applications with ColdFusion...
Страница 350: ...324 Developing Web Applications with ColdFusion...
Страница 362: ...336 Developing Web Applications with ColdFusion...