-1
我有三個複選框。如果一個複選框被啓用,我想禁用其他兩個複選框。我如何使用JQuery和HTML來實現它?禁用複選框
我要實現它在MVC 4
Forenoon @Html.CheckBoxFor(x => x.FromDateforenoon, new {
style = "width:auto;",
id = "chkFromDate",
@onchange = "CalculatedaysOfLeave();"
})
Afternoon @Html.CheckBoxFor(x => x.FromDateafternoon, new {
style = "width:auto;",
id = "chkAfternoon",
@onchange = "CalculatedaysOfLeave();"
})
FullDay @Html.CheckBoxFor(x => x.FromDateFullDay, new {
style = "width:auto;",
id = "chkFullDay",
@onchange = "CalculatedaysOfLeave();"
})
感謝您對我想要做的javascript.How我可以實現answers.If? –
Mussaib Siddiqui的答案是純粹的JavaScript。但你用jquery lol標記了這個問題 – Luke