IE?μ???????????????label?????е?bug???
???????????? ???????[ 2015/8/27 18:03:16 ] ??????????????????
????????У????????д?????????????????radio????checkbox??????????????????????????????????label????????FF/Chrome?????????????????radio/checkbox?????????????????????IE?????????仯??
????????????????????id??????????label??for??????????
?????????????
????<input type="radio" name="gender" id="gender1" value="??" checked="checked" />
????<label for="gender1">??</label>
????<input type="radio" name="gender" id="gender2" value="?" />
????<label for="gender2">?</label>
???????CSS????display:none ???? visibility: hidden?????radio??????????label?л???????????????????????δ?????????????????м????
????1.???javascript???????β???DOM????????
????$("label").click(function(e){
????e.preventDefault();
????$("#"+$(this).attr("for")).click().change();
????});
????2.?????display:none?????position?????λ???????????????????
????position: absolute;
????top: -999px;
????left: -999px;
????3.???z-index/width???????opacity???????????
????input{
????position: absolute;
????z-index: -1;
????}
??????????
????input{
????width: 0;
????}
??????????
????input{
????-webkit-opacity:0;
????-moz-opacity:0;
????opacity:0;
????filter:alpha(opacity:0);
????}
???????????????label??for????????????????????js?????htmlFor??????????????????????for???????document.getElementById("xxx").htmlFor="inputid";;
??????IE6-IE9???????????????????IE???????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11