如何使用jquery禁用标记 [英] how to disable a tag using jquery
本文介绍了如何使用jquery禁用标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想使用jquery在我的页面中禁用标记,我尝试了很多。但是我找不到预期的结果请帮忙。
我的代码是
i want to disable a tag in my page using jquery, i try a lot. but i can't find expected result please help.
my code is
$("#li2 a").attr('disabled', 'disable');
$("#li2 a").prop('disabled', true);
提前感谢。
thanks in advance.
推荐答案
(< span class =code-string> #li2 a)。attr(' disabled',' disable') ;
("#li2 a").attr('disabled', 'disable');
( #li2 a)。prop( ' disabled', true );
("#li2 a").prop('disabled', true);
提前感谢。
thanks in advance.
您好希望此链接有用:
http://stackoverflow.com/questions/13004734/how-to-disable-a-li-tag-using-javascript [ ^ ]
Hi, hope this link will help:
http://stackoverflow.com/questions/13004734/how-to-disable-a-li-tag-using-javascript[^]
这篇关于如何使用jquery禁用标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文