Javascript language

adplus-dvertising
Prompt Box in JavaScript
Previous Home Next

A prompt box is often used if you want the user to input a value before entering a page.

Step 1. Written below code in your application

<script language="javascript">
function displayDate()
{
alert(Date());
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Display</title>
</head>

<body>
    <form id="form1" runat="server">
    <div>
    <button type="button" onclick="displayDate()">DisplayDate</button>
    </div>
    </form>
</body>
</html>

Step 2. Run the Application. Click on Button.

You Entered in Website

Previous Home Next