This question have many answers out there but none of those answers solved my problem. I have a modal with some tags. I am trying to save the value
HTML
× Modal Header JS $('#save').click(function() { $select_value = $("#exampleSelect").value(); $('#someModalId').modal('hide'); }); Give your select a name or id Set the value of select to a global variable. Make sure to declare the variable at the top if you are getting an error. 0 讨论(0) 查看其它6个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
JS
$('#save').click(function() { $select_value = $("#exampleSelect").value(); $('#someModalId').modal('hide'); });