This is not possible with an OS or native browser window popping up. You will have to create a custom overlay dialog.

I would advise using a library like jQuery UI to do this. You can then customize whatever is in the popup.

You can view a demo of the dialog here

Answer from NDM on Stack Overflow
🌐
EyeHunts
tutorial.eyehunts.com › home › javascript prompt multiple input
JavaScript prompt multiple input - Tutorial - By EyeHunts
August 22, 2022 - const inputs = prompt("Enter your inputs separated by a tilde ~").split("~"); console.log(inputs); Simple example code asking the user to provide multiple data with delimiters e.g.
🌐
Irt
irt.org › script › 1667.htm
Q1667 Is it possible to prompt the user for two values? - irt.Org
<script language="JavaScript"><!-- var userid = ''; var password = ''; var windowReference; function promptForTwo() { var w = 480, h = 340; if (window.screen) { w = screen.availWidth; h = screen.availHeight; } var popW = 300, popH = 150; var leftPos = (w-popW)/2, topPos = (h-popH)/2; window.open('popup.htm','windowName','width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos); if (!windowReference.opener) windowReference.opener = self; } function done() { alert('userid = ' + userid + '\npassword = ' + password); } promptForTwo(); //--></script>
🌐
Talkerscode
talkerscode.com › howto › javascript-prompt-multiple-input.php
JavaScript Prompt Multiple Input - TalkersCode.com
All the codes of our JavaScript goes under these tags. Now, here we create our function or say define it. Using prompt, we create a prompt box and set default value. In this if the color is filled then it will shows the message like wow black your choice is too good. But if you not fill any value then it directly shows the message. We hope that you understand the codes properly. Here, using this method we are able to create multiple inputs instead of one.
🌐
Sololearn
sololearn.com › en › Discuss › 1677785 › its-possible-take-multiple-inputs-from-the-user-in-a-same-line-in-javascript-prompt
Its possible take multiple inputs from the user in a same line in javaScript prompt? | Sololearn: Learn to code for FREE!
multiple input in one prompt · javascript · 4th Feb 2019, 7:40 AM · Jamaluddin Mondal · 1 AnswerAnswer · + 3 · var inputs = prompt("Enter your values, seperated by commas: ").split(","); 4th Feb 2019, 8:19 AM · Rowsej · Answer · Learn ...
Find elsewhere
🌐
W3Schools
w3schools.com › jsref › met_win_prompt.asp
Window prompt() Method
The prompt() method displays a dialog box that prompts the user for input.
🌐
SheCodes
shecodes.io › athena › 5105-how-to-collect-information-from-several-prompts-in-javascript
[JavaScript] - How to collect information from several prompts in JavaScript
Find out how to use a conditional (if...else) statement and a loop (for) statement to collect information from several prompts with JavaScript and present one final alert.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › API › Window › prompt
Window: prompt() method - Web APIs | MDN
const signButton = document.querySelector("#signButton"); const log = document.querySelector("#log"); signButton.addEventListener("click", () => { let sign = prompt("What's your sign?"); if (sign === null) { log.innerText = "OK, maybe next time."; } else if (sign.toLowerCase() === "") { log.innerText = "Don't be shy, enter your sign!"; } else if (sign.toLowerCase() === "scorpio") { log.innerText = "Wow! I'm a Scorpio too!"; } else { log.innerText = `${sign} is my favorite!`; } }); There are multiple ways to use a prompt, using prompt, window.prompt, and providing a message and default values:
🌐
WebDeveloper.com
webdeveloper.com › community › 30117-prompt-window-with-two-input-fields
prompt window with two input fields
all i need is a window with two text input fields, but the text entered has to be returned to the script. other than that, i don't rly care if it is a prompt window or something else. ... Copy linkTweet thisAlerts: @steelersfan88Mar 12.2004 — #Simple:[code=php]<script type="text/javascript"> var myName = prompt("Name Here:","") var myAge = prompt("Age Here:","") alert(myName +", you are "+ myAge +" years old!") </script>[/code]
🌐
YouTube
youtube.com › wes bos
JavaScript Multiple Inputs Code Along + Challenge - YouTube
A quick little code along to make these multiple input verification codes in Vanilla JS. Code here: https://github.com/wesbos/javascript-verification-inputs
Published   October 22, 2020
Views   5K
🌐
GitHub
github.com › fabien-d › alertify.js › issues › 234
Multiple inputs when using prompt · Issue #234 · fabien-d/alertify.js
July 9, 2014 - Multiple inputs when using prompt#234 · Copy link · JoseRoman · opened · on Jul 9, 2014 · Is it possible to have more than 1 input in alertify.js? No one assigned · No labels · No labels · No projects · No milestone · None yet · No branches or pull requests ·
🌐
Medium
freddycorly.medium.com › a-better-js-prompt-838df93dce96
A better JS prompt. Everybody knows how ugly the built-in… | by Fredo Corleone | Medium
October 10, 2021 - SmartPrompt.prototype.parseResult = function () { let formData = new FormData(this.getForm()); return [...formData.entries()] .reduce((result, tuple) => (result[tuple[0]] = tuple[1], result) , {} ); };// <input type="text" name="myName"> // will become // { myName: "whatever was inputted" } In order to encapsulate the prompt markup and style I use a UUID:
🌐
Stack Overflow
stackoverflow.com › questions › 22431717 › how-to-get-multiple-input-at-the-same-time-in-javascript › 22431759
how to get multiple input at the same time in javascript? - Stack Overflow
Most programmers are used to getting input like this from command line programming. Don't do this in a visual environment. Use a form. – Derek 朕會功夫 Commented Mar 16, 2014 at 1:26 ... var r = prompt("Enter username, password"), v = r.split(","), username, password; if(c.length === 2) { username = v[0].trim(); password = v[1].trim(); }
🌐
KnowledgeHut
knowledgehut.com › home › blog › web development › javascript prompt input: a quick guide
JavaScript Prompt Input: A Quick Guide
April 25, 2024 - Hope now you know how to take multiple input from user in javascript. The prompt() function shows a dialog with an optional message urging the user to type some content. It is typically used if the user wishes to input a value before visiting a page. It returns a string containing the text ...