开发者

html checkbox gets clicked when it shouldn't

开发者 https://www.devze.com 2023-02-20 01:31 出处:网络
I have a table with three columns. One with an input te开发者_运维百科xt box and the two others with an input checkbox. So :

I have a table with three columns. One with an input te开发者_运维百科xt box and the two others with an input checkbox. So :

inputText - inputCheckbox - inputCheckBox
inputText - inputCheckbox - inputCheckBox
inputText - inputCheckbox - inputCheckBox
inputText - inputCheckbox - inputCheckBox

When I click anywhere on the table, the first checkbox change his value. this is incomprehensible.

Any clue ?

Even if jquery is included in the page, no javascript is linked to this table and controls.

Finaly I could isolate the code : jsfiddle.net/P86du


My guess is you have an unclosed <label> tag. Clicking on a label will check the associated box.

Without seeing the source, we won't know for sure.


With plain HTML this should never happen- do you have addons in your browser that might interfere?

Are there any source code snippets "onXXX" (e.g. onClick, onBlur, ...)? Are there any script-tags?

A link to your html-source might be handy.

0

精彩评论

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

关注公众号