- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Fetch value from Alert pop up in jQuery
To fetch value from alert pop up, use alert(). At first, use prompt() to input the value from user. Following is the code −
Example
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initialscale=1.0"> <title>Document</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css"> <script src="https://code.jquery.com/jquery-1.12.4.js"></script> <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script> </head> <body> <script> var value = prompt("Please enter an integer value"); var multiplyBy10=10*value; alert("Result after multiplying by 10 = "+ multiplyBy10); </script> </body> </html>
To run the above program, save the file name “anyName.html(index.html)” and right click on the file. Select the option “Open with Live Server” in VS Code editor −
Output
This will produce the following output −
Put an integer value and click the OK button.
After clicking the OK button, the snapshot is as follows −
- Related Articles
- How I can replace a JavaScript alert pop up with a fancy alert box?
- How to pop-up the first element from a Python tuple?
- Can selenium handle Windows based pop up?
- Fetch the value from Decade Tuple in Java
- How do I automatically download files from a pop up dialog using selenium-python?
- Fetch the value from a LabelValue Tuple in Java
- Fetch the value from an Octet Tuple in Java
- How to close the pop up window in selenium running?
- How to fetch nth div from an HTML page using jQuery?
- Fetch the maximum value from a MySQL column?
- How to handle "Plugin blocked" pop up using Selenium Python?
- How to fetch the value from a KeyValue Tuple in Java?
- How to avoid the pop-up window in chrome browser with Selenium?
- How to pop a single value in MongoDB?
- How to get value from serialized array in jQuery?

Advertisements