zoukankan      html  css  js  c++  java
  • Dynamics CRM JS 隐藏子网格“+”号(不推荐,随笔记录)

    调用示例代码:

     hideAddButton(window, "tab_approval_process,nextcustomer,billTo,account_attachment");
    function hideAddButton(w, subgrids) {
        ///<summary>隐藏子网格加号按钮</summary>
        /// <param name="w">window对象</param>
        /// <param name="subgrids">子网格名称,多个英文逗号隔开</param>
      var subgrid = subgrids.split(',');
        for (var i = 0; i < subgrid.length; i++) {
            var _id = subgrid[i] + "_contextualButtonsContainer";      var _button = w.document.getElementById(_id);
            if ((_button == null || _button == undefined) && window.parent != null && window.parent != undefined) {
                _button = w.parent.window.document.getElementById(_id);
            }
            if (_button != undefined && _button != null) {
                _button.style.display = "none";
            }
        }
    }

    function hideAddButton(w, subgrids) {    ///<summary>隐藏子网格加号按钮</summary>    /// <param name="w">window对象</param>    /// <param name="subgrids">子网格名称,多个英文逗号隔开</param>    console.log("w=" + w);    console.log("subgrids=" + subgrids);
        var subgrid = subgrids.split(',');    for (var i = 0; i < subgrid.length; i++) {        var _id = subgrid[i] + "_contextualButtonsContainer";        console.log("ID=" + subgrid[i] + ",i=" + i);        var _button = w.document.getElementById(_id);
            if ((_button == null || _button == undefined) && window.parent != null && window.parent != undefined) {            _button = w.parent.window.document.getElementById(_id);        }        if (_button != undefined && _button != null) {            _button.style.display = "none";            console.log("ID=" + _id + ",Display=" + _button.style.display);        }    }
    }

  • 相关阅读:
    【09-04】java内部类学习笔记
    【09-03】java泛型学习笔记
    【08-23】redis学习笔记
    【06-23】js动画学习笔记01
    【11-23】mysql学习笔记02
    【06-18】CentOS使用笔记
    thinkphp+datatables+ajax 大量数据服务器端查询
    python遗传算法实现数据拟合
    简单的新闻客户端APP开发(DCloud+thinkphp+scrapy)
    python游戏编程——跟13岁儿童学编程
  • 原文地址:https://www.cnblogs.com/dmei/p/15601493.html
Copyright © 2011-2022 走看看