开发者

What does the javascript (insert name of object here) 'defaultChecked' do?

开发者 https://www.devze.com 2023-02-02 06:10 出处:网络
What does the javascript (insert name of开发者_StackOverflow中文版 object here) \'defaultChecked\' do?

What does the javascript (insert name of开发者_StackOverflow中文版 object here) 'defaultChecked' do?


The defaultChecked property returns the default value of the checked attribute.

This property returns true if the checkbox is checked by default, otherwise it returns false.

Quoted from W3Schools.


What don't you understand? http://www.w3schools.com/jsref/prop_checkbox_defaultchecked.asp


Maybe example will help? http://jsfiddle.net/yahavbr/cCpUu/

As you see if the checkbox has the "checked" attribute it will return true otherwise false - note however it's not affected by the "current" checked state of the checkbox.

0

精彩评论

暂无评论...
验证码 换一张
取 消