about 9 years ago
With the help of this javascript prompt() function, I have created a dialog box that will be used for taking user input. The prompt() method displays a dialog box that prompts the user to input data
<!DOCTYPE html> <html> <head> <script type="text/javascript"> function myPrompt(){ var promptValue = prompt('Supply text:', 'optional default value'); if(promptValue != null){ document.getElementById("status").innerHTML = promptValue; } } </script> </head> <body> <p><input type="button" value="Value" onclick="myPrompt()"></p> <h3 id="status">text value...</h3> </body> </html>
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)