禁用人员选取器的拼写检查 - InfoPath表单

时间:2018-05-17 15:01:50

标签: sharepoint-online infopath

您可以帮我禁用InfoPath表单中的人员选取器拼写检查字段吗?

我的代码很少。但是,这对InfoPath表单没有帮助。

请指导我。

1 个答案:

答案 0 :(得分:0)

        $('div').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

            var InputHtml = HtmlPlaceHolder.getElementsByTagName('input');
            for (var i = 0; i < InputHtml.length; i++)
            {
                InputHtml[i].setAttribute("excludeFromSpellCheck", "true");    
            }

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
                HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });

    $('input').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

            var InputHtml = HtmlPlaceHolder.getElementsByTagName('input');
            for (var i = 0; i < InputHtml.length; i++)
            {
            InputHtml[i].setAttribute("excludeFromSpellCheck", "true");    
            }

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
            HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });

        $('textarea').blur(function(){
        debugger;
        setTimeout(function(){
            var HtmlPlaceHolder = document.getElementById('WebPartWPQ2');

            var InputHtml = HtmlPlaceHolder.getElementsByTagName('input');
            for (var i = 0; i < InputHtml.length; i++)
            {
            InputHtml[i].setAttribute("excludeFromSpellCheck", "true");    
            }

            var HtmlTextArea= HtmlPlaceHolder.getElementsByTagName('textarea');
            for (var i = 0; i < HtmlTextArea.length; i++)
            {
            HtmlTextArea[i].setAttribute("excludeFromSpellCheck", "true");    
            }
        },2000);
    });