最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

logging - Coda: Automatically Clear JavaScript Console on page reload? - Stack Overflow

programmeradmin6浏览0评论

Is there any setting in Coda, or hackable solution, to get the JavaScript Console log to automatically clear itself after page reload?

I often stumble when I see old errors in the log, that doesn't still exist.

Is there any setting in Coda, or hackable solution, to get the JavaScript Console log to automatically clear itself after page reload?

I often stumble when I see old errors in the log, that doesn't still exist.

Share Improve this question edited Jul 9, 2020 at 10:50 braX 11.8k5 gold badges22 silver badges37 bronze badges asked Apr 30, 2009 at 9:00 HenrikHenrik 2,5914 gold badges26 silver badges34 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 6

Use:

console.clear();

If you want to erase all the previous logs and to show the fresh ones - put it on top of your JavaScript file.

If you use jQuery try

$(function(){ console.clear(); });

Or try

window.onload = function(){ setTimeout("console.clear()",3000) }
发布评论

评论列表(0)

  1. 暂无评论