Pak Solutions

...Pak Solutions...

Now develop your site only in 35, 00 first times in Pakistan. For Details plz Visit Pak Solutions

Tuesday, July 17, 2012

Time Displaying Function of JavaScript

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function displayDate()
{
document.getElementById("demo").innerHTML=Date();
}
</script>
</head>
<body>

<h1>Pak Solutions</h1>
<p id="demo">Welcome to Pak Solutions.</p>

<button type="button" onclick="displayDate()">Display Date</button>

</body>
</html>



(Just Copy to Notepad, save it with the name as you want, make sure that you save it as name.html, and run it)

Enjoy

No comments:

Post a Comment