Results 1 to 4 of 4
  1. #1

  2. #2
    Registered User
    Join Date
    Jan 2019
    Posts
    24
    Definition and Usage. The prompt() method displays a dialog box that promptsthe visitor for input. A prompt box is often used if you want the user to input a value before entering a page.

  3. #3
    Registered User
    Join Date
    Mar 2019
    Location
    Ahmedabad
    Posts
    180
    • The prompt() method displays a dialog box that prompts the visitor for input.
    • A prompt box is often when we want the user to input a value before entering a page.When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value.If the user clicks "OK" the box returns the input value. If the user clicks "Cancel" the box returns null.

    Example::
    HTML Code:
    <html>
       <head>     
          <script type = "text/javascript">
             
                function getValue() {
                   var retVal = prompt("Enter your name : ", "your name here");
                   document.write("Hi : " + retVal);
                }
     
          </script>      
       </head>
       
       <body>
          <p>Click  to see the result: </p>      
          <form>
             <input type = "button" value = "Click Me" onclick = "getValue();" />
          </form>      
       </body>
    </html>

  4. #4
    Registered User
    Join Date
    Apr 2019
    Posts
    210
    It display The dialog Box which prompt the visitor for input

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.