更新时间:2022-06-06 00:15:26
正确的方法是使用显示和隐藏:
显示
隐藏
$('#id').hide(); $('#id').show();
另一种方法是使用jQuery css 方法:
An alternate way is to use the jQuery css method:
$("#id").css("display", "none"); $("#id").css("display", "block");
如何使用jQuery更改CSS不显示内容或阻止属性?