开发者

BlackBerry: [un]checking HTML checkboxes with JS not working

开发者 https://www.devze.com 2022-12-17 08:18 出处:网络
I am trying to check and uncheck an <input type=\"checkbox\" /> by adding and removing the checked=\"checked\" attribute using javascript (jQuery). It works great in Firefox & IE. Adding and

I am trying to check and uncheck an <input type="checkbox" /> by adding and removing the checked="checked" attribute using javascript (jQuery). It works great in Firefox & IE. Adding and removing disabled="disabled" works perfectly. But with checked, neither clearing nor adding the attribute does anything.

I'm writing in XHTML 1.0 Strict--I tried switching everything around to HTML 4.1 and just 开发者_JAVA百科using checked with no equals sign or value, and it still didn't work.

I'm working on Eclipse with the BlackBerry 9000 Simulator 4.6.0.200904091609-212.

Any ideas? A bug? Thanks.


Have you tried setting the DOM object's checked property to false, the old-fashioned way?

0

精彩评论

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