A Function Definition : Function : Language Basics JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Language Basics » Function »

 

A Function Definition



<HTML>
<HEAD>
<TITLE>A function definition</TITLE>
<SCRIPT LANGUAGE="JavaScript"><!--
function displayTaggedText(tag, text) {
 document.write("<"+tag+">")
 document.write(text)
 document.write("</"+tag+">")
}
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript"><!--
displayTaggedText("H1","This is a level 1 heading")
displayTaggedText("P","This text is the first paragraph of the document.")
// -->
</SCRIPT>
</BODY>
</HTML>
           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Language Basics
» Function