20 lines
544 B
JavaScript
20 lines
544 B
JavaScript
<HTML>
|
|
<HEAD>
|
|
<TITLE>A function definition - Happy Codings :-) C++, C#, HTML, Java, JavaScript Code Examples</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. Happy Codings :-) JavaScript Code Examples")
|
|
// -->
|
|
</SCRIPT>
|
|
</BODY>
|
|
</HTML> |