1.动态添加节点
var parentElement=$('#test');
parentElement.prepend('<input class="" id="demo" style="width:200px;height:28px">');
2.初始化combobox
$('#demo').combobox({
required:false,
valueField: 'account',
textField: 'name',
mode:'remote',
url:url,
editable:true,
hasDownArrow:true,
});
$.parser.parse(parentElement);
3.销毁combobox
$('#demo').combobox('destroy');
4,和步奏1一样,重新动态添加节点
5.和步奏2一样,重新初始化combobox,(控制台会抛出异常)但不影响使用
异常为Uncaught TypeError: Cannot read properties of undefined (reading 'combo')