如何在文档就绪时使用jquery禁用div [英] how to disable div using jquery on document ready
本文介绍了如何在文档就绪时使用jquery禁用div的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想禁用div,我试了很多,我可以帮忙,我试过的代码如下:
$(#step2 ).prop(disabled,true);
$(#step3)。prop(disabled,true);
和
$(#step2)。attr('禁用','禁用');
$(#step3)。attr('禁用','禁用');
i want to disable a div, i tried a lot, i can do this please help , my tried code is below:
$("#step2").prop("disabled", true);
$("#step3").prop("disabled", true);
and
$("#step2").attr('disabled', 'disabled');
$("#step3").attr('disabled', 'disabled');
推荐答案
(#step2)。prop(disabled,true);
("#step2").prop("disabled", true);
(\"#step3\").prop(\"disabled,true);
和
("#step3").prop("disabled", true);
and
(#step2)。attr('禁用','禁用');
("#step2").attr('disabled', 'disabled');
这篇关于如何在文档就绪时使用jquery禁用div的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文