如何检查复选框是否已选中jquery上的函数加载 [英] How to check if check box is checked or not function load on jquery
本文介绍了如何检查复选框是否已选中jquery上的函数加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何检查复选框是否已选中jquery上的功能加载
我尝试过:
< input type =checkboxname =planned_checkedid =planned_checked>
函数actual_planned_path(时间)
{
if($(#planned)。prop('checked')== true){
checkbox_cheked();
}
其他
{
checkbox_uncheked();
}
}
how to check if check box is checked or not function load on jquery
What I have tried:
<input type="checkbox" name="planned_checked" id="planned_checked">
function actual_planned_path(time)
{
if($("#planned").prop('checked') == true){
checkbox_cheked();
}
else
{
checkbox_uncheked();
}
}
推荐答案
(#planned)。prop ('选中')== true){
checkbox_cheked();
}
else
{
checkbox_uncheked();
}
}
("#planned").prop('checked') == true){
checkbox_cheked();
}
else
{
checkbox_uncheked();
}
}
你写的复选框的不同ID错误
You wrote different id of check box its wrong
<input type="checkbox" name="planned_checked" id="planned_checked">
function actual_planned_path(time)
{
if(
(#planned_checked)。prop('checked')== true)
{
checkbox_cheked();
}
其他
{
checkbox_uncheked();
}
}
("#planned_checked").prop('checked') == true) { checkbox_cheked(); } else { checkbox_uncheked(); } }
现在有效
你可以从jfiddle检查
检查预览
这篇关于如何检查复选框是否已选中jquery上的函数加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文