Javascript language

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

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: