切换两个复选框与一个单击,没有js [英] Toggle two checkboxes with one click and without js
问题描述
有一种方法只需点击一下即可切换两个组合的复选框?
我有一个小型压延机,复选框。一周可以在两个月内,所以我有两个复选框的同一周。
<$> c $ c>< label for =aa>< input type =checkboxid =bb/>< / label>< br /
< label for =bb>< input type =checkboxid =aa/>< / label>
查看我的更新小提示一个完整的例子。
这在Firefox中工作正常(exept你双击)在IE9只是复选框切换到您点击的位置。
请不要建议使用JavaScript。我知道这很简单。
如何只有一个复选框?我的意思是,只有一个星期,虽然它跨越几个月,它不是两整个星期!考虑你的设计,即周末结束4/5/2012是一个周末结束于5月,确定它从4月开始,但如果你打算把你的星期在一个袋子,如果可能的话,做一些明确的事情。 >
Is there a way to toggle two combined checkboxes with one click?
I have a small calander where I want to select weeks with checkboxes. One week can be in two month so I have two checkboxes for the same week. How can I combine them safe?
I'm using this abstract HTML:
<label for="aa"><input type="checkbox" id="bb" /></label><br />
<label for="bb"><input type="checkbox" id="aa" /></label>
See my updated fiddle for a full example.
This works fine in Firefox (exept you make a double click) in the IE9 is just the checkbox toggled where you click on.
Please don't suggest to use JavaScript. I know that this would be very simple.
How about only having one checkbox? I mean, there's only one week, although it spans months it isn't two entire weeks! Consider your design, i.e. Week Ending 4/5/2012 is a week ending in May, sure it starts in April but if you're going to put your weeks in a bag, do it by something definitive if you can.
这篇关于切换两个复选框与一个单击,没有js的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!