隐藏Dynamics CRM中的div内容

时间:2017-02-17 07:29:33

标签: javascript jquery html5 dynamics-crm crm

以下是我到目前为止隐藏div内容的代码。但不幸的是,它并不适用于CRM在线。

 function hideSocialEmailErrorMsgBlock() {
       debugger;
       var _errorMsgBlock = document.getElementById("emailnotification");
       var _warningMessage = document.getElementById("warningmessage");
       if ((errorMsgBlock == null && errorMsgBlock == undefined) || (warningMessage == null && warningMessage != undefined)) 
       {
        setTimeout(hideSocialEmailErrorMsgBlock, 1000);
        return;
       }
       else
       {
        document.getElementById("emailnotification").innerHTML = '';
        document.getElementById("warningmessage").innerHTML = '';
        // code has to be placed here...
        // $("#warningmessage").hide();
        // $("warningmessage").attributes("style.display","none");
        // $("emailnotification").attributes("style.display","none");
        //$("#emailnotification").hide();
        setTimeout(hideSocialEmailErrorMsgBlock, 1000);
       }
    }

这是前端的形象。

enter image description here

这是网页的图片。

enter image description here

我必须隐藏网页上显示的错误。

1 个答案:

答案 0 :(得分:1)

如果您想使用Javascript完全隐藏您的电子邮件通知div,您可以使用:

  

document.getElementById(' emailnotification')。style.display =' none';

这比尝试隐藏所有文本更简单。