You cannot do this from the alert window if that is what you mean. But you could use any number of libraries to create a popup, which is basically just a and makes your form inside.
Then you can bind a button or something else to a function that closes the box and parses the form in your structures in Javascript.
source share