0
我想從選項jQuery的 - 如何設置semanic UI下拉值
statuses = [
{ value: 'all', name: 'All' },
{ value: true, name: 'Received' },
{ value: false , name: 'Not Yet' }
];
// my jquery doesn't work
if (params['invoiceStatus'] && params['invoiceStatus'] !== '') {
this.args.invoiceStatus = params['invoiceStatus'];
$('#invoiceStatus').dropdown(
'set selected', params['invoiceStatus']);
} else {
$('#invoiceStatus').dropdown('all');
}
陣列設置一個值下拉我加入這個jQuery:
if (params['invoiceStatus'] && params['invoiceStatus'] !== '')
{
this.args.invoiceStatus = params['invoiceStatus'];
$('#invoiceStatus').dropdown('set selected', params['invoiceStatus']);
}
else {
$('#invoiceStatus').dropdown('all');
}
但不工作
,但我想在'PARAMS [「invoiceStatus」]使用的值' – CMB
我更新了我的一個輔助函數的答案,它需要params對象和任何你的名字正在檢查 – zepdrix