Is there any way to create prompt with two input fields?

后端 未结 4 2017
名媛妹妹
名媛妹妹 2020-12-06 08:45

Is there any way to create prompt in JavaScript with two input fields ?

I tried that code, but it didn\'t help me :

var a = prompt(\"A : \", \"\");         


        
4条回答
  •  粉色の甜心
    2020-12-06 09:33

    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

提交回复
热议问题