Chrome & console.log & color & js】的更多相关文章

Chrome & console.log & color & js console.log & color // OK log(`%cchat_list =\n%c${JSON.stringify(list, null, 4)}`, `color: #f0f;`, `color: #0f0; background: #000;`); // BAD log(`%cchat_list =`, `color: #f0f;`, `%c${JSON.stringify(list, n…
js console.log color all in one console.log color Chrome console.log 语法 / grammar %c, %s, css style console.log(`%cString`, `css style 1`); console.log(`%cString 1, %s`, `css style 1`, `String 2`); const css = `css style`; console.log(`%cString`, css…
题目就是js,可能就是一个js的代码,查看源码并复制,在Chrome中打开网页,审查元素. 将复制的代码输入,将eval改成console.log,再回车执行,就得到一段js代码. 代码中有Unicode编码:\u0053\u0069\u006d\u0043\u0054\u0046\u007b\u006a\u0073\u005f\u0065\u006e\u0063\u006f\u0064\u0065\u007d 解码就拿到flag了.…
console.log(object [, object, ...]) Displays a message in the console. You pass one or more objects to this method, each of which are evaluated and concatenated into a space-delimited string. The first parameter you pass to log() may contain format s…
把红框里的内容去掉就可以了 那个框是过滤..…
如果你的项目中console.log了很多信息,但是发到生产环境上又不想打印这些信息,这时候就需要设置一个全局变量,如:debug, 用正则匹配一下参数: const getQueryStr = (name) => { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1…
一.JS的且运算记得最开始看到window.console&&console.log(123),当时知道能起什么作用但是没有深入研究,最近在研究后总算弄明白了.要理解这个,首先得明白三个知识点第一:短路原则这个大家都非常清楚的了,在做且运算的时候,“同真才真,一假则假”,比如true&&true==truetrue&&false==falsefalse&&false==falsefalse&&true==false 第二:JS…
console.log是什么东西,其实就是一个打印js数组和对像的函数而已,就像是php的print_r,var_dump.console.log这个函数本身没什么好说的,这篇博客告诉大家怎么去用这个函数.在说这个函数之前,我想大家用的最多查看js输出,是alert吧,但是alert,只能弹string或者是int的 一,测试文件test.html <html xmlns="http://www.w3.org/1999/xhtml"> <head> <me…
console.log() 基本用法 console.log,前端常用它来调试分析代码,你可以在任何的js代码中调用console.log(),然后你就可以在浏览器控制台看到你刚才打印的常量,变量,数组,对象,表达式等的值. 首先看最基本的用法: console.log('123'); console.log('1', '2', '3'); // 1 2 3 console.log('1\n2\n3\n'); // // 我们可以通过上面的方式进行单个变量(表达式).多个变量以及换行输出.而这对…
一 实例 打印字符串和对象: 可展开对象查看内部情况: 看一下console对象本身的定义情况: 输出对象情况: utag对象所在文件: 输出对象: 二 Console.log 总结 1   如果你js没到一个境界,我就算教你调试bug,破解一些插件之类的,你也根本不知道我在做什么.我的目的只是让你认识控制台,让你入门调试,之后的路还得靠你们自己走. 不论是 chrome firefox ie(8以上版本) 还是 360急速浏览器 搜狗浏览器 等等,只要按 F12 就能打开控制台.其实对于这 F…