Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

124
Views
how to display html data inside JavaScript prompt?

my idea is to convert JavaScript prompt into a popup or Dialog Model but it is not working as expected.

       <!DOCTYPE html>
       <html>
       <body>
       <button onclick="myFunction()">Try it</button>

    <script>
            function myFunction() {
              let person = prompt(
        "<h1>Please enter your name</h1> 
              <br> upload a pic 
               <input type='file'> ", "yes","no");
                      if (person != null) {
                // do something..
          }
        }
        </script>

        </body>
        </html>

is it possible to display html inside prompt ? just like dialog or popups.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Prompts are controlled by the browser. You can only provide a string to them. You can check the MDN Docs for more details.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!