PDA

View Full Version : What do you mean by the prompt box?



tony_S
01-28-2019, 01:22 AM
What do you mean by the prompt box?

softwaretesting
01-31-2019, 07:21 AM
Definition and Usage. The prompt() method displays a dialog box that promptsthe visitor for input. A prompt box is often used if you want the user to input a value before entering a page.

Sherin
06-14-2019, 01:27 AM
The prompt() method displays a dialog box that prompts the visitor for input.

A prompt box is often when we want the user to input a value before entering a page.When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value.If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the box returns null.


Example::

<html>
<head>
<script type = "text/javascript">

function getValue() {
var retVal = prompt("Enter your name : ", "your name here");
document.write("Hi : " + retVal);
}

</script>
</head>

<body>
<p>Click to see the result: </p>
<form>
<input type = "button" value = "Click Me" onclick = "getValue();" />
</form>
</body>
</html>

chetna
07-05-2019, 07:23 AM
It display The dialog Box which prompt the visitor for input