blog's People
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.