[英]KendoUI dropdownlist
It is possible to call a function (show div) if the user choose only the third value on the dropdownlist?如果用户只选择下拉列表中的第三个值,是否可以调用函数(显示 div)?
<script>
$(document).ready(function() {
var data = [
{text: "Initial Notification", value:"1"},
{text: "Update Notification", value:"2"},
{text: "Final Notification", value:"3"}
];
$("#notificationtype").kendoDropDownList({
dataTextField: "text",
dataValueField: "text",
dataSource: data,
height: 400
});
var dropdownlist = $("#notificationtype").data("kendoDropDownList");
});
</script>
Managed to make it as设法使它成为
$(document).ready(function() {
var data = [
{text: "Initial Notification", value:"1"},
{text: "Update Notification", value:"2"},
{text: "Final Notification", value:"3"}
];
$("#notificationtype").kendoDropDownList({
dataTextField: "text",
dataValueField: "text",
dataSource: data,
height: 400,
change: function() {
var notificationstate = $("#notificationtype").val();
if (notificationstate == "Final Notification") {
$('#finaltime').show();
} else{
$ ('#finaltime').hide();
}
}
});
var dropdownlist = $("#notificationtype").data("kendoDropDownList");
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.