Javascript Templa
Javascript Templa
8M
Sign up for our free weekly Sign in ×
Web Dev Newsletter.
Create
Templates using
JavaScript
Cookie Policy
Introduction
document.write("Hello World
This is a text")
document.write("<html><head>
<title>Create Templets by Using
JavaScript</title></head>")
document.write("<body>")
document.write("<h3
align='center'>This is a html
file created by using
JavaScript</h3>")
document.write("</body>
</html>")
Header:
document.write("<html><head>
</head>")
document.write("<body
bgcolor='#ffffff'>")
Content:
document.write("<h3
align='center'>This is a html
file created by using
JavaScript</h3>")
Footer:
document.write("</body>
</html>")
<script language="JavaScript"
src="header.js"></script>
<h3 align="center">This is a
html file created by using
JavaScript</h3>
<script language="JavaScript"
src="footer.js"></script>
header.js:
document.write("<head>")
document.write("<title>3A Web
Design</title>")
document.write("<meta http-
equiv='Content-Type'
content='text/html;
charset=iso-8859-1'>")
document.write("<meta
name='author' content='Nongjian
Zhou'>")
document.write("<style
type='text/css'>")
document.write("<!--")
document.write("h1
{color:#ee9933; font-size:24px;
font-family: Verdana, Arial,
Helvetica, sans-serif}")
document.write("h2
{color:#ee9933; font-size:18px;
font-family: Verdana, Arial,
Helvetica, sans-serif}")
document.write("h3 {font-
size:16px; font-family:
Verdana, Arial, Helvetica,
sans-serif}")
document.write("h4 {font-
size:14px; font-family: 'New
Times Roman'}")
document.write("p {font-
size:12px; font-family:
Verdana, Arial, Helvetica,
sans-serif}")
document.write("pre
{color:#994400; font-size:10px;
font-family: Verdana, Arial,
Helvetica, sans-serif}")
document.write("a:link
{text-decoration: none}")
document.write("a:hover {text-
decoration: underline; color:
#FF0000}")
document.write("-->")
document.write("</style>")
document.write("</head>")
document.write("")
document.write("<table
width='100%' height='100%'
border='0' cellspacing='0'
cellpadding='0'>")
document.write("<tr><td
colspan='2' height='120'
align='center'
bgcolor='#eeeeee'>")
document.write("<h1>3A Web
Design</h1>")
document.write("<pre><div
align='right'>Updated:"
+document.lastModified+" &
nbsp; </div></pre>")
document.write("</td></tr>")
document.write("<tr><td
rowspan='2' align='center'
valign='top' width='180'
bgcolor='#eeeeee'><br>")
document.write("<table
width='140' align='center'
valign='top' cellspacing='2'
cellpadding='5'>")
document.write("<tr><td
bgcolor='#dddddd'>")
document.write("
<p> <a
href='aboutUs.htm'><b>About
Us</b></a></p>")
document.write("</td></tr>")
document.write("<tr><td
bgcolor='#dddddd'>")
document.write("
<p> <a
href='services.htm'><b>Our
Services</b></a></p>")
document.write("</td></tr>")
document.write("<tr><td
bgcolor='#dddddd'>")
document.write("
<p> <a
href='works.htm'><b>Our
Works</b></a></p>")
document.write("</td></tr>")
document.write("<tr> <td
bgcolor='#dddddd'>")
document.write("
<p> <a
href='clients.htm'><b>Our
Clients</b></a></p>")
document.write("</td></tr>")
document.write("<tr><td
bgcolor='#dddddd'>")
document.write("
<p> <a
href='contactUs.htm'><b>Contact
Us</b></a></p>")
document.write("</td></tr>")
document.write("</table>")
document.write("</td>")
document.write("<td
align='center'><table
width='95%' height='100%'><tr>
<td>")
footer.js:
document.write("</pre></table>
</td></tr><tr><td
valign='bottom' height='50'>")
document.write("<hr><pre>3A Web
Design @ 2000, All Rights
Reserved</pre>")
document.write("</td></tr>
</table>")
document.write("")
document.write("")
test.htm:
<script language="JavaScript"
src="header.js"></script>
<h3 align="center">This is a
html file created by using
JavaScript</h3>
<script language="JavaScript"
src="footer.js"></script>
License
Share
TWITTER FACEBO
OK
Nongjian Zhou
www.itechcollege.com
East Timor
Comments and
Discussions
Search Comments
New to javascript
Member 11673820 7-May-15 19:29
A better way
Arch4ngel 28-Nov-05 0:52
Other methods
Philippe Lhoste 24-Oct-00 2:38
Refresh 1