Using JavaScript to Create HTML Tags : HTML Generate « HTML « JavaScript DHTML





Using JavaScript to Create HTML Tags

<HTML>
<HEAD>
<TITLE>Using JavaScript to create HTML tags</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
greeting = "<H1>Hi Web surfers!</H1>"
welcome = "<P>Welcome to <CITE>www.java2s.com</CITE>.</P>"
// -->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
document.write(greeting)
document.write(welcome)
// -->
</SCRIPT>
</BODY>
</HTML>

           
       










Related examples in the same category

1.Generating HTML On the Fly