📅  最后修改于: 2022-03-11 14:58:10.303000             🧑  作者: Mango
var img = document.querySelector("#img_div img"),
observer = new MutationObserver((changes) => {
changes.forEach(change => {
if(change.attributeName.includes('src')){
console.dir(img.src);
}
});
});
observer.observe(img, {attributes : true});