Team:Harvard/JS Test Page

From 2011.igem.org

(Difference between revisions)
(Created page with "<html> <head> <script type="text/javascript"> function displaymessage() { alert("Hello World!"); } </script> </head> <body> <form> <input type="button" value="Click me!" onclick...")
 
Line 2: Line 2:
<head>
<head>
<script type="text/javascript">
<script type="text/javascript">
-
function displaymessage()
+
function displayDate()
{
{
-
alert("Hello World!");
+
document.getElementById("demo").innerHTML=Date();
}
}
</script>
</script>
</head>
</head>
-
 
<body>
<body>
-
<form>
 
-
<input type="button" value="Click me!" onclick="displaymessage()" />
 
-
</form>
 
-
<p>By pressing the button above, a function will be called. The function will alert a message.</p>
+
<h1>My First Web Page</h1>
 +
<p id="demo">This is a paragraph.</p>
 +
 
 +
<button type="button" onclick="displayDate()">Display Date</button>
</body>
</body>
</html>
</html>

Latest revision as of 20:46, 6 July 2011

My First Web Page

This is a paragraph.