label勾选问题,checkbox

<input id="overck_21" data-role="none" name="check" class="regular-radio2" type="checkbox">
<label for="overck_21" data-role="none">
     本人同意并接受
</label>


  if(!$('.mor-box2 input').is(':checked')){
      methods.prompt("请先阅读并同意《个人信息保护声明》");
      return false;
  };
  
  
.regular-radio2 {
    display: none;
}       
.regular-radio2+label {
    -webkit-appearance: none;
    position: relative;
    padding-left: 0.3rem;
    background: url(../images/my-c1.png) no-repeat left center;
    background-size: 0.25rem 0.25rem;
    font-size: 0.24rem;
    color: #333333;
    width: 0.22rem;
    height: 0.52em;
}

.regular-radio2:checked+label {
    background: url(../images/my-c2.png) no-repeat left center;
    background-size: 0.25rem 0.25rem;
}

原文地址:https://www.cnblogs.com/liubingyjui/p/12896229.html