ColdFusion - How to append text to the page output stream

WriteOutput() - append text to the page output stream

WriteOutput.cfm


<!DOCTYPE html">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>WriteOutput function example: how to append text to the page output stream</title>
</head>

<body>
<h2 style="color:Crimson">WriteOutput Function Example</h2>

<cfscript>
 Value1=10;
 value2=15;
 Value3=25;
 Sum=Value1+Value2+Value3;
 WriteOutput("<b>Value1</b>" & "=" & Value1 & "<br/>");
 WriteOutput("<b>Value2</b>" & "=" & Value2 & "<br/>");
 WriteOutput("<b>Value3</b>" & "=" & Value3 & "<br/>");
 WriteOutput("<b>Value1+Value2+Value3</b>= "& Sum);
</cfscript>
</body>
</html>






More ColdFusion examples