0
功能我有一个文本框,我想负载2自动单选按钮选项建议基础如何删除自动提示文本框上
意味着,如果用户选择选项按钮1,则自动提示应该装载的产品员工table.if用户选择选项按钮2,然后自动建议加载自定义产品表。
我使用jQuery的自动提示
我怎么能实现这种功能
举例 当我选择单选按钮SetAutoSuggest方法将被调用
function SetAutoSuggest(ProductType) {
if (ProductType == "PRODUCT") {
$("#PantryFooodItemName").autocomplete('<%= Url.Action("GetAutosuggestProductlistForMeal", "Autosuggest") %>',
{
minChars: 2,
width: 300,
multiple: false,
matchContains: true,
mustMatch:true,
formatItem: formatItem,
formatResult: formatResult
}
);
}
if (ProductType == "CUSTOMPRODUCT") {
$("#PantryFooodItemName").autocomplete('<%= Url.Action("GetCustomProduct", "Autosuggest") %>',
{
minChars: 2,
width: 300,
multiple: false,
matchContains: true,
mustMatch: true,
formatItem: formatItem,
formatResult: formatResult
}
);
}
}
我没有得到正确的 –
没有得到正确的什么? –