⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 17-10.js

📁 js 全的样例代码,比较适合大家学习和交流
💻 JS
字号:
// Define a NodeFilter function to accept only <img> elementsfunction imgfilter(n) {   if (n.tagName == 'IMG') return NodeFilter.FILTER_ACCEPT;   else return NodeFilter.FILTER_SKIP;}// Create a NodeIterator to find <img> tagsvar images = document.createNodeIterator(document, // traverse entire document	/* only look at Element nodes */ NodeFilter.SHOW_ELEMENT,	  /* filter out all but <img> */ imgfilter,	  /* unused in HTML documents */ false);// Use the iterator to loop through all images and do something with themvar image;while((image = images.nextNode()) != null) {    image.style.visibility = "hidden";  // Process the image here}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -