把chrome的安全策略关掉之后,在动漫之家的网页加载前载入外被文件 内容如下
document.addEventListener('DOMContentLoaded', () => {
console.log(document.querySelector('#center_box'));
console.log(document.querySelector('#center_box > img'));
pic = document.querySelector('#center_box > img');
if (pic.complete) {
downloadPic();
window.stop();
return;
}
pic.addEventListener('load', downloadPic);
});
得到的结果是
和
null
结果为什么会是null,而且对center_box调用childnodecount()得到的结果是0
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
认证高级PHP讲师