DelphiFAQ Home Search:
General :: Web publishing :: JavaScript
Code snippets to add functionality to your HTML pages, preferably cross-browser.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

How to prompt the user with an inputbox in Javascript

Question:

Is there a Javascript function similar to the "InputBox" function in VBScript?

Answer:

Yes, use prompt(Question, Default) as shown below.

<script type="text/javascript">
 <!--
 
 var answer = prompt ("What is your age?","20");
 alert ("You are " + answer + " years old.")
 
 // -->
 </script>

Generated 0:01:56 on Sep 22, 2018