0
我有一個表單來收集用戶的國家和州。我正在使用bootstrap-formhelpers-states.js庫來收集這些數據。但是當我vardump提交的post數組時,只發送了州和國家的簡碼。Bootstrap表單助手states.js
我的問題是一樣的,因爲這Bootstrap form helper not picking complete country name
,但同樣沒有得到回答。謝謝大家
我有一個表單來收集用戶的國家和州。我正在使用bootstrap-formhelpers-states.js庫來收集這些數據。但是當我vardump提交的post數組時,只發送了州和國家的簡碼。Bootstrap表單助手states.js
我的問題是一樣的,因爲這Bootstrap form helper not picking complete country name
,但同樣沒有得到回答。謝謝大家
我假設代碼是給選擇選項的值。您可以使用jquery通過每個選項的文本更改每個選項的值。可能工作。
<script>
$(document).ready(function() {
$("#selectId > option").each(function() {
$(this).val($(this).text());
alert(this.text + ' ' + this.value);
});
});
</script>
謝謝,但我已經更改爲另一個庫。這個圖書館已被創作者拋棄。 –