Monday 16 July 2012

How to create Acting to the onclick event using javascript


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

<h1>My First Web Page</h1>
<p id="demo">This is a paragraph.</p>

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

</body>
</html>

0 Responses to “How to create Acting to the onclick event using javascript”

Post a Comment