In the past, I've seen javascript alert()
style popups but they had input fields in them.
These forms are much like the primitive username/password field inputs you see when an .htpasswd
file is used.
Can someone tell me how to implement this using regular javascript? (No libraries please)
In the past, I've seen javascript alert()
style popups but they had input fields in them.
These forms are much like the primitive username/password field inputs you see when an .htpasswd
file is used.
Can someone tell me how to implement this using regular javascript? (No libraries please)
Share Improve this question asked Oct 13, 2010 at 20:38 mačekmaček 77.8k37 gold badges170 silver badges200 bronze badges1 Answer
Reset to default 10Yes, you're thinking of prompt
. It's just:
var userInput = prompt("text to display", "default input text");
Note that this is just a general input mechanism. It's separate from the authentication dialog, though the underlying browser code may use the same GUI controls.