我有一个以这种方式定义的数组来填充bootstrap可编辑下拉列表(x-editable)
$alist="[{value:'64000',text:'Depreciation Expense'},{value:'67600',text:'Payment Processing Exp.'},{value:'67650',text:'Consulting Services'},{value:'67670',text:'Translations'},{value:'67690',text:'Cash Pickup - Collection'},{value:'67700',text:'Bank Expenses'},{value:'67800',text:'Financial Income/Loss'},{value:'67900',text:'Exceptional Item'},{value:'68000',text:'FX Gain/Loss'},{value:'90000',text:'Year Profit/Loss'}]";
html显示下拉列表:
<td><a href="#" id="account_number" data-source="<?php echo $alist;?>" data-type="select" data-pk="<?php echo $row['id'] ?>" data-url="ajax.php" ><?php echo $row['account_number']; ?></a></td>
我可以通过在我的ajax.php处理文件中获取帐号来实现,但有没有办法直接这样做?
当显示下拉列表时,我希望选择显示值和文本(例如“67650-支付处理服务”),但只注册值(67650)