Menu ▼

Previous Next

Alert message in javascript :

We will use the inbuilt alert function in javascript for alerting the user with some message.

The following example will show you how to call the alert function.




Code sample :

Design

<input type="button" value="GetDateTime" onclick="showdatetime();" />

<script language ="javascript">
function showdatetime()
{
 alert(new Date());
}
</script>

Previous Next




Search dotnetlearners.com