Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在完全加载的页面上,我如何从 chrome js 控制台更改(递归)img src(甚至是基本文本)?我需要实时看到效果!所以肯定需要将给定的 srcA 更改为 srcB :D
谢谢!
这有效(在SO上测试):
var a = document.getElementsByTagName('img'); for(var i in a) if(a[i].src != undefined && a[i].src.indexOf("static") != -1) a[i].src=".";
将点替换为所需的新 URL,“static”是旧 URL 片段的占位符。