使用javascript / jquery禁用多行文本框和人员选择器 [英] Disable multiline textbox and People picker using javascript / jquery
本文介绍了使用javascript / jquery禁用多行文本框和人员选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用jquery / javascript在编辑列表中禁用多行文字(增强型富文本模式)和人物选择器?
How to disable multiline text (Enhanced rich text mode) and People picker in Edit list using jquery / javascript ?
我尝试了以下,但没有工作
I tried the below, but is not working
function DisableTextArea(title) {
var newOutput = $("textarea[title='"+ title +"']").hide().val();
$("textarea[Title='"+ title +"']").closest("span").append( newOutput );
$("textarea[Title='"+ title +"']").closest("span").find("table[id$='_toolbar']").hide();
$("textarea[Title='"+ title +"']").closest("span").find("iframe[title='Rich Text Editor']").hide();
$("textarea[Title='"+ title +"']").closest("span").parent("span").find("span.ms-formdescription").hide();
$("textarea[Title='"+ title +"']").closest("td").contents().filter(function(){
return(this.nodeType == 3);
}).remove();
}
DisableTextArea("User Comments");
$("input[title='Peoplepicker field']").prop('disabled', true);
$(".sp-peoplepicker-delImage").hide();
谢谢
Thanks
推荐答案
你好吗?是编辑项目页面?您将此脚本放在内容编辑器中的哪个位置?你能解释一下吗?
Do you mean in edit item page? Where are you putting this script in a content editor? can you explain a bit more?
这篇关于使用javascript / jquery禁用多行文本框和人员选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文