prompt( ) –
The browser provides a built-in function that can be used to get input from the user, named prompt. The prompt( ) method displays a dialog box that prompts the visitor for input.
Once the prompt function obtains input from the user, it returns that input.
Syntax: –
prompt(text, defaultText)
Ex–
- prompt(“Enter Your Name: “, “name”);
- prompt(“Enter Your Roll No. : “);
Good Approach
- Inline
- External
- Inside head Tag
- Inside bodyTag
Latest posts by rajeshkumar (see all)
- AWS Error: Access denied by EC2 Instance Connect - December 4, 2023
- How to get Blackduck Trial version? - December 3, 2023
- PHP ionCube Error: cannot be decoded by this version of the ionCube Loader - December 2, 2023