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 : ", "");
var b = prompt("B : ", "");
alert(a + "\n" + b);
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