Git Product home page Git Product logo

blog's People

Contributors

lpeng111 avatar

Watchers

 avatar  avatar

blog's Issues

测试

就想看看用issues写博客好不好用

引用
代码块

var nextPageSelector = request.selector;
        var showlist = request.showlist;
        var node = document.querySelector(nextPageSelector);
        var targetNode = document.querySelector(showlist);
        node.click();

        // 点击翻页按钮后,监听目标元素是否产生变化
        if (targetNode) {
            if (targetNode) {
                observer.observe(targetNode, config);
            }
        }

linux基本文件操作

删除一天前文件

find 目录 -type f -mtime +1 -exec rm {} \;

删除10分钟前文件

find 目录 -type f -mmin +10 -exec rm {} \;

javascript监听元素变更

javascript提供了MutationObserver用于监听DOM文档的某个元素的变更情况。
使用方法如下:

// 初始化监听器
var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver

// 监听元素的哪些操作
var config = {
    childList: true
};

// 回调函数
var callback = function () {
    console.log("测试");
};

// 新建一个监听器变量
var observer = new MutationObserver(callback);

// 开始监听
// targetNode为DOM元素
observer.observe(targetNode, config);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.