我使用剑道模板如下:
<script type="text/javascript" src="@Url.Content("~/Scripts/Module/Analysis/CreateMaintainAnalysis.js")"></script>
<script type="text/x-kendo-template" id="Modeltemplate">
<div class="section group fr">
<div class="col span_2_of_12">
#if(ACTIVE_MODELS_COUNT > 0){# <input class="ModelCheckBox" type="checkbox" checked/>#} else {# <input class="ModelCheckBox" type="checkbox" unchecked/> #}#
</div>
<div class="col span_4_of_12"><label>#:MODEL#</label></div>
</div>
</script>
我想在 CheckBox Click 上编写点击事件,如下所示:
$("#ModelListView").kendoListView({
template: kendo.template($("#Modeltemplate").html())
});
$(".ModelCheckBox").click(function () {
if (this.checked) { alert("Checked"); }
});