i have a situation where i am bound to give multiple input box in a prompt box in JavaScript or jQuery, is there any way we can do this.
Any help would be appreciated.
Have a look at jQuery UI Dialog, especially the modal form example.
$(document).ready(function() {
$("#dialog").dialog({
close: function(event, ui) {
// do whatever you need on close
}
});
});
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<div id="dialog">
<input type="text" id="input1" />
<input type="text" id="input2" />
</div>
you cannot tweak "Prompt box" of browser, however you can use jquery ui dialog box
$( "#dialog" ).dialog();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With