<form onsubmit="return checkform()" > <div style=" width:100%; border:0px #000 solid; float:left;"> <label for="a1"><div style=" width:300px; height:300px; border:1px #cccccc solid;">11</div></label> <input type="radio" name="a" id="a1" checked="checked" value="ddddd" /> <label for="a2"><div style=" width:300px; height:300px; border:1px #6CF solid;">22</div></label> <input type="radio" name="a" id="a2" value="adsfasd"/> </div> </form>
今天做了單選的樣式自定義效果,但是無奈label關聯不到input的checked,依然是天地會的群友幫助了我,非常感謝。以此記錄。
$("label").mouseover(function(){
alert($('#'+$(this).attr('for'))[0].checked)
})
