这里我是ang2的新手,请帮忙
<input type="checkbox" value="chk1" (change)="mon($event)" />
mon(eve: any) {
console.log(eve);
alert(eve);
}
这里我如何获得复选框值
答案 0 :(得分:1)
尝试:
=CHOOSE(HOUR(R3)+1, "C", "C", "C", "C","C","C", "A", "A", "A", "A", "A", "A", "A","A","B","B","B","B","B","B","B","B","C","C")
如果选中,则 mon(eve: any) {
console.log(eve.target.checked);
alert(eve.target.checked);
}
应为布尔eve.target.checked
,否则为true
。
如果您需要获取值,那么总是&#39; chk1&#39;在您的情况下,请在false