📌  相关文章
📜  如何从检查元素中隐藏链接 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:29.958000             🧑  作者: Mango

代码示例1
var currentInnerHtml;
var element = new Image();
var elementWithHiddenContent = document.querySelector("#element-to-hide");
var innerHtml = elementWithHiddenContent.innerHTML;

element.__defineGetter__("id", function() {
    currentInnerHtml = "";
});

setInterval(function() {
    currentInnerHtml = innerHtml;
    console.log(element);
    console.clear();
    elementWithHiddenContent.innerHTML = currentInnerHtml;
}, 1000);