检索Bootstrap国家选择器选择的值

时间:2016-01-26 08:39:22

标签: php twitter-bootstrap post

我使用Bootstrap表单助手国家选择器列出国家/地区,我想检索所选值以将其插入到db表中。如何检索所选值?

<div id="country" class="bfh-selectbox bfh-countries" data-country="US" data-flags="true">
</div>

我尝试使用jQuery发送它,但没有检索,我不知道所选选项的保存位置!

 $("#reg_form").on("submit", function () {
        var hvalue = $('#country').attr('data-country');
        $(this).append("<input type='hidden' name='country' value=' " + hvalue + " '/>");
    });

国家/地区选择器示例4的链接: http://bootstrapformhelpers.com/country/#jquery-plugins

0 个答案:

没有答案
相关问题