Description
CDN Search
75CDN jsDelivr
<!DOCTYPE html>
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta charset="utf-8" />
    <title>NetnrRun</title>
</head>

<body>

</body>

</html>
(function (window) {

    var Watermark = function (ops) { return new Watermark.fn.init(ops); }

    Watermark.fn = Watermark.prototype = {
        init: function (ops) {
            var wm = document.createElement("div");
            wm.innerHTML = "张三,市场部<br/>" + (new Date().toLocaleString());
            var left = document.documentElement.offsetWidth / 2 + 150;
            wm.style.cssText = "position:fixed;bottom:120px;left:" + left + "px;color:#333;z-index:99;opacity:.3;user-select:none;pointer-events:none;transform:rotate(-45deg);text-align:center";

            ops.id = ops.id || document.body;
            ops.id.appendChild(wm);

            window.addEventListener('resize', function () {
                var cw = document.documentElement.offsetWidth;
                var left = cw / 2 + 150;
                if (left > cw - 150) {
                    left = cw - 150;
                }
                wm.style.left = left + "px";
            })

            return this;
        }
    }

    Watermark.fn.prototype = Watermark.fn.init.prototype;

    window.Watermark = Watermark;

})(window);

setTimeout(function () {
    Watermark({
        id: document.body
    });
}, 1000 * 1)