The following example will show you how to call the alert function.
Design:
<input type="button" value="GetDateTime" onclick="showdatetime();" />
<script language ="javascript">
function showdatetime()
{
alert(new Date());
}
</script>
O/P :
Once you click on this button you will get the alert that contains date and time
No comments:
Post a Comment