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.
Coda 中是否有任何设置或可破解的解决方案,以使 JavaScript 控制台日志在页面重新加载后自动清除?
当我在日志中看到旧错误时,我经常会绊倒,这些错误仍然不存在。
利用:
console.clear();
如果你想删除所有以前的日志并显示新的 - 把它放在你的 JavaScript 文件的顶部。
如果你使用 jQuery 试试
$(function(){ console.clear(); });
或者试试
window.onload = function(){ setTimeout("console.clear()",3000) }