[英]How can I display a warning to users who open the Chrome console, like Facebook and Blockchain does?
您可以设置console.log消息的样式:
console.log('%cStop!', 'color: red; font-size: 30px; font-weight: bold;');
您可以在window
load
事件中使用console.warn()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.