Wednesday, March 5, 2014

Javascript HTML output

This can be done by using the javascript builten methods as
document.write("<H1>Hello Javascript!</H1>");
document.write("<p>Hello Javascript!</p>");

HTML code:
 <!DOCTYPE html>
 <html>
<head>
<script>
document.write("<H1>Hello Javascript!</H1>");
document.write("<p>Hello Javascript!</p>");
</script>
</head>
 </html>

Output:

No comments:

Post a Comment