0

我在我的 asp.net 项目中使用了 ckeditor.net dll。

在我的母版页之一中,我使用了 ckeditor:

<CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server" AutoGrowMinHeight="120"></CKEditor:CKEditorControl>

然后,我在 jquery 中通过此代码将 NewsDetail div 的所有子项设置为“禁用”:

$("Div#NewsDetail").find("*").attr('disabled', true);

通过此代码,ckeditor 也被禁用。我的问题是,当我尝试通过以下代码删除禁用属性时,ckeditor 没有再次启用:

$("Div#NewsDetail").find("*").removeAttr('disabled');

我该如何启用它?

4

1 回答 1

2

如果您使用的是 jQuery 1.6+,最好使用.prop.removeProp ..

不要删除属性,而是尝试更改属性值,例如

$("Div#NewsDetail").find("*").prop('disabled', false);
于 2014-07-19T08:47:11.053 回答