IE:
Chrome:
Firefox:
Not only is it ugly, it is also not even close to consistent. Don't use prompt
.
Use a real <form>
instead.
If you're a more advanced developer, you can try making your own custom prompt
. My own toolbox has a function called Dialog
in which I can define text fields, drop-downs, and much much more. Here's a simple example of a prompt
-like dialog:
However, as I said, this is relatively advanced. The function Dialog(...) {...}
code in my source files is filled with features but over 200 lines long, and the dialog shown above is created with the code...
Dialog("Hello!","Please answer the question:",
{type:"input",value:"test",flex:3},
// flex:3 results in it being three times bigger than the button
{text:"Submit",onclick:function(inputs) {alert("You said "+inputs[0].value);}},
{cancelable:true}
);