<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"  />

<label for="a2"><div style=" width:300px; height:300px; border:1px #6CF solid;">22</div></label>
<input type="radio" name="a" />

</div>
</form>

  今天做了单选的样式自定义效果,但是无奈label关联不到input的checked,依然是天地会的群友帮助了我,非常感谢。以此记录。

$("label").mouseover(function(){
	alert($('#'+$(this).attr('for'))[0].checked)
})

  

相关文章:

  • 2021-12-21
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-05-28
  • 2021-06-22
  • 2021-05-08
猜你喜欢
  • 2022-03-08
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-02-08
  • 2021-07-19
相关资源
相似解决方案