Is there a difference between these two ways of default checking a checkbox:
document.getElementById(checkboxId).defaultChecked = checked;
vs
document.getElementById(checkboxId).checked = checked;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
i guess theres no difference if you use it as a setter. but if you use it as getter there will be difference.
becouse .defaultChecked as the name already telling you is checking the default value not the current one.