Tuesday, April 1, 2014

Show HTML literally

<!DOCTYPE html>
<html>
<body>

<h1>My First JavaScript</h1>
<p>Click the button to display the current day, date, and time.</p>
<p id="demo"></p>

<button type="button" onclick="myFunction()">Try it</button>

<script>
function myFunction()
{
document.getElementById("demo").innerHTML = Date();
}
</script>

</body>
</html> 

Labels: , ,

2 Comments:

At April 7, 2014 at 9:05 PM , Anonymous test change name said...

This comment has been removed by the author.

 
At April 28, 2014 at 11:40 PM , Anonymous test change name said...

comment by admin

 

Post a Comment

Note: Only a member of this blog may post a comment.

Subscribe to Post Comments [Atom]

<< Home