首页 > jQuery的prop在chrome下没生效

jQuery的prop在chrome下没生效

$("#sth").prop("disabled",false);
$("#sth").prop("disabled",true);

在IE、FF下有效,在Chrome下无效,select、button都没有用。。。
怎么解决?


我试过了是可以的呀, 你再试下吧, 确认引入了最新的jquery库

<script src="http://cdn.bootcss.com/jquery/2.2.0/jquery.min.js"></script>
<!-- ... -->

<button type="button" name="button" id="sth"> 点我! </button>

<script>
    $("#sth").prop("disabled",true);
    $("#sth").attr("disabled",true);
</script>
【热门文章】
【热门文章】