HTML: 

<input type="checkbox" >

<div >隐藏层</div>

JS:

$(function () {

  if ($("#check-expert").attr("checked") == "checked") {

    $("#expert").css('display', 'block');
  }

  $("#check-expert").on('click', function () {

    if ($(this).is(':checked')) {

      $("#expert").css('display', 'block');

    } else {

      $("#expert").css('display', 'none');
    }
  })
});

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-31
  • 2021-11-06
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-01-22
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-20
相关资源
相似解决方案