如何去掉jQWidgets中TreeGrid和Grid右下角的链接
關(guān)于如何去掉這個(gè)水印,這是官方的說法。
?
更新了jQWidgets版本,發(fā)現(xiàn)在使用過程中發(fā)現(xiàn)每次渲染完TreeGrid和Grid后會(huì)在表格右下角出現(xiàn)一個(gè)www.jqwidgets.com的span標(biāo)簽。
在相關(guān)的腳本中搜索www.jqwidgets.com相關(guān)的關(guān)鍵字都沒有對(duì)應(yīng)結(jié)果。于是準(zhǔn)備從其父容器下手,一般來說這種js生成的標(biāo)簽都會(huì)使用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方法將隱藏了數(shù)據(jù)明文,轉(zhuǎn)以ASCII碼替代。
接下來就好辦了,這里我們把this.content[0].appendChild(f)注釋就可以了。
?
?
ref:?http://www.xdlysk.com/article/5785f7dbf46a268c098a5c55
轉(zhuǎn)載于:https://www.cnblogs.com/pinganzi/p/6658840.html
總結(jié)
以上是生活随笔為你收集整理的如何去掉jQWidgets中TreeGrid和Grid右下角的链接的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: R语言 生存分析
- 下一篇: 基本数据类型的自动装箱