How to save and close a bootstrap modal?

后端 未结 6 1514
醉酒成梦
醉酒成梦 2021-02-13 06:17

This question have many answers out there but none of those answers solved my problem. I have a modal with some

In your code, you can then assign the value of the select element to a variable.

For example:

var data_1;
$('#save').click(function() {
  data_1  = $("#data_1").value();
  $('#modalid').modal('hide');
});

You can then use that variable elsewhere in your code.

There are many more possibilities for solving this, but the root of the issue is being able to identify the select elements in code and recording their respective values.

提交回复
热议问题