• 如何去掉jQWidgets中TreeGrid和Grid右下角的链接


    关于如何去掉这个水印,这是官方的说法

    更新了jQWidgets版本,发现在使用过程中发现每次渲染完TreeGrid和Grid后会在表格右下角出现一个www.jqwidgets.com的span标签。

    在相关的脚本中搜索www.jqwidgets.com相关的关键字都没有对应结果。于是准备从其父容器下手,一般来说这种js生成的标签都会使用appendChild之类的方法将自己添加到父容器中。最后找到其父容器有: jqxdatatable.js,jqxgrid.js

    我们来看看这段代码: 

    _rendercelltexts : function () {
                var d = String.fromCharCode(119, 119, 119, 46, 106, 113, 119, 105, 100, 103, 101, 116, 115, 46, 99, 111, 109);
                if (location.hostname.indexOf(d.substring(4)) == -1) {
                    if (this._gridRenderElement) {
                        b(this._gridRenderElement).remove()
                    }
                    var e = String.fromCharCode(83, 80, 65, 78);
                    var c = String.fromCharCode(72, 84, 84, 80, 58, 47, 47);
                    var f = document.createElement(e);
                    f.id = b.jqx.utilities.createId();
                    f.innerHTML = d;
                    f.style.position = "absolute";
                    f.style.right = "5px";
                    f.style.bottom = "5px";
                    f.style.color = "#909090";
                    f.style.cursor = "pointer";
                    f.style.zIndex = "999999";
                    f.style.display = "none";
                    f.style.fontSize = "9px";
                    f.onmousedown = function () {
                        open(c + d)
                    };
                    this.content[0].appendChild(f);
                    this._gridRenderElement = f
                }
            }

    它这里使用了String.fromCharCode方法将隐藏了数据明文,转以ASCII码替代。

    接下来就好办了,这里我们把this.content[0].appendChild(f)注释就可以了。

    ref: http://www.xdlysk.com/article/5785f7dbf46a268c098a5c55

  • 相关阅读:
    用nodejs 开发的智能提示
    分布式系统之消息中间件rabbitmq
    理解RESTful架构
    zf框架的思想及学习总结
    php网上支付易宝
    phpstorm使用技巧
    phpstorm使用技巧
    mysql中的数据类型
    CF113D 高斯消元、dp
    bzoj4008: [HNOI2015]亚瑟王 dp
  • 原文地址:https://www.cnblogs.com/pinganzi/p/6658840.html
Copyright © 2020-2023  润新知