This is the magic button to display date and time, your country right now
Here is the Javascript code:
<script type="text/javascript">
function displayDate()
{
document.getElementById("life").innerHTML=Date();
}
</script>
<br />
<h2 style="background-color: yellow;">
Click 'the date' button and display date</h2>
<div id="life">
This is the magic button to display date and time, your country right now </div>
<button onclick="displayDate()" type="button">, time, your country is</button>
_____________________________________
Because I've Javascript buttons on this website therefore only the first button at the top works. This code will work in your blog post!
Like this:
http://testingclouds.blogspot.com/2011/09/function-displaydatedocument.html
No comments:
Post a Comment