Jason Xiao Jason Xiao - 1 year ago 98
Javascript Question

If we can invoke browser prompt dialog box with multi inputs fields and custom note?

People say we cannot customize DOM prompt box, but I have seen servers like xampp admin login page provide multi inputs dialog box. If we can make our own?

For example like this one

Answer Source

You can't manipulate the browsers prompt, but you can create your own custom prompt easily. Here's a dummy for you:

#foo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  background-color: gray;
  padding: 30px;  
<div id="foo">
    Jolly rogers hobble from graces like big plunders.
    To the sour lettuce add celery, herring, coconut milk and cored zucchini.
  <input >
  <input >
    Click me!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download