- Alert, prompt, and confirm boxes are the three main pop-up boxes that can be created in JavaScript.
- Alert boxes are used to alert the user to important info regarding the site and require the user to click ‘OK’ in order to proceed.
- Alert boxes are created using the following syntax:
- window.alert(“Text”);
- Prompt boxes prompt the user to input some form of data before proceeding.
- Prompt boxes are created using the following syntax:
- window.prompt(“Prompt Text”,”Default value”);
- Confirm boxes are used when for verification, such as agreeing to a terms of service, rendering a TRUE value when the user clicks ‘OK’.
- Confirm boxes are created with the following syntax:
- window.confirm(“Confirm text here.”);
Monday, June 29, 2015
What types of pop-up boxes you can create in JavaScript and how can you create them?
Subscribe to:
Post Comments (Atom)
What is restrict option in directive?
The restrict option in angular directive, is used to specify how a directive will be invoked in your angular app i.e. as an attribute, class...
-
JavaScript is a general-purpose programming language designed to let programmers of all skill levels control the behavior of software objec...
-
The delete operator is used to delete all the variables and objects used in the program ,but it does not delete variables declared with...
No comments:
Post a Comment