我有这个 MVC 控件这是我的控件
@Html.Obout(new Obout.Mvc.ComboBox.ComboBox("Country")
{
SelectedIndex = 0,
ShowSelectedImage = true,
ClientSideEvents = new ComboBoxClientSideEvents()
{
OnSelectedIndexChanged = "checkalert"
},
OnSelectedIndexChanged="checkalert",
ID = "Country1",
FolderStyle = "~/Content/Obout/ComboBox/styles/plain",
FilterType = Obout.Mvc.ComboBox.ComboBoxFilterType.Contains,
Width = 150,
Height = 200,
MenuWidth = 640
})
这是我的 js 函数:
function checkalert() {
debugger;
alert(" change");
return '1';
}
我有一个错误
Uncaught ReferenceError: checkalert is not defined
我需要checkalert()
在选定索引更改时触发一个函数