清空控制台Console.log()信息
原创
©著作权归作者所有:来自51CTO博客作者挚爱的强哥的原创作品,请联系作者获取转载授权,否则将追究法律责任
/*清空控制台信息*/
function clearConsole() {
console.clear();
let fontFamily = "微软雅黑";
let fontSize = 40;
let fontWeight = "bold";
let backgroundColor = "green";
console.log("%c有代码洁癖的强哥温馨提示:百度的报错代码清除掉!", "background:" + backgroundColor +
"; color:white;font-family: '" + fontFamily + "'; font-size:" + fontSize + "px;font-weight:" + fontWeight);
}