使用jQuery/JavaScript禁用多选查询列 [英] Disable multi-selection lookup column using jQuery/JavaScript

查看:98
本文介绍了使用jQuery/JavaScript禁用多选查询列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个查询列(选择多个项目).我想在Edit form.aspx中禁用该控件.

I have a lookup column ( multiple item selection ). I would like to disable the control in Edit form.aspx.

如何使用jQuery/Javascript实现这一目标?

How to achieve this using jQuery/ Javascript?

谢谢

推荐答案

请修改"MultipleLookup"添加到下面代码中的字段名称中,然后将其添加到脚本编辑器Web部件的editform.aspx页中.

Please modify the "MultipleLookup" to your field name in code below, then add it to script editor web part into editform.aspx page.

<script src="//code.jquery.com/jquery-3.1.0.min.js" type="text/javascript"></script>
<script type="text/javascript">


(function(){ var html ='< input disabled ='"class ="ms-ButtonHeightWidth"; id =" AddButton" type ="button" value =添加","br","br","=","=","=","=","=" class ="ms-ButtonHeightWidth"; id ="RemoveButton" type ="button" value ="<<删除>';
(function () { var html='<input disabled="" class="ms-ButtonHeightWidth" id="AddButton" type="button" value="Add >"><br><br><input disabled="" class="ms-ButtonHeightWidth" id="RemoveButton" type="button" value="< Remove">';


("table [id ^ ='MultipleLookup'] .ms-input.ms-noWrap").html(html); }); </script>
("table[id^='MultipleLookup'] .ms-input.ms-noWrap").html(html); }); </script>

最好的问候,

丹尼斯


这篇关于使用jQuery/JavaScript禁用多选查询列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆