Everyone has used various types of browsers, each browser has its own characteristics, I humble opinion, in my browser, I am the most like chrome, because it for debugging scripts and front-end design and debugging have it than other browsers more than the place. Perhaps you will have a certain understanding of console.log, the mind will inevitably want to debug when the use of alert does not go, why also use console.log such a long string of strings
Interested classmates can post the last code copy paste to the console to play.Go for CodeIn normal mode, you can generally only output simple text messages to the console console. But in order to output the information more elegantly and easily readable, in addition to the Cosole.log () method can also call Cosole.warn () to output the warning message, the effec
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
In normal mode, you can generally only output simple text messages to the console console. But in order to output the information more elegantly and easily readable, in addition to the Cosole.log () method can also call Cosole.warn () to output the warning message, the effect in the console is as follows:There is a yellow triangular warning symbol with an exclama
Details of the Chrome console consoleLet's take a look at how to open the browser console before you go into detail.To open Google Developer tools, there are three ways
Ctrl+shift+i
F12
In the Web page, right click on "Review Element", you will open the browser developer tool
You can see that there is a poem in the
Chrome Console Console UsageLet's take a look at what the console has to offer for debugging purposes.The current console methods and properties are:["$$", "$x", "dir", "Dirxml", " values ", " profile ", " inspect ", " copy ", "clear", "Geteventlisteners", " $ ", " $ ",
The effect of the following figure
The PHP console is a chrome plug-in that can help users simulate the actual PHP Web environment and help users debug PHP code using the Chrome plugin, and after the user has installed the PHP console plugin in Chrome, You can reference t
the number of times the code is executed.9, Console.dir (This method is I often use can not know how much more convenient than for in) directly to the DOM node in the structure of the DOM tree output, you can detail the method of object development and so on.10, Console.time time to start. Console.timeend time is over (look at the picture below and you'll feel it in a moment)11. Keys and values return the data that consists of all the property names of the incoming object, which returns an arra
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone console.log will have a certain understanding of the heart will inevitably want to debug when the use of the alert line, why also use console.log such a long string of strings to rep
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
Everyone has worked on various types of browsers, each browser has its own characteristics, in my humble opinion, I used the browser, I am the most like chrome, because it for debugging scripts and front-end design debugging has it more than other places. Perhaps everyone to Console.log will have a certain understanding, in the mind will inevitably want to debug when using alert not on the line, why also use Console.log so a long string of strings to
For more information, please click here.In normal mode, you can generally only output simple text messages to the console console. But in order to output the information more gracefully and easily read,In addition to the Cosole.log () method, you can call Cosole.warn () to output a warning message, and the effect in the console is as follows:There is a yellow tri
Chrome Console Console UsageLet's take a look at what the console has to offer for debugging purposes. The current console methods and properties are: ["$$", "$x", "dir", "Dirxml", "Keys", "values", "Profile", "Profileend", "monitorevents", "unmonitorevents", "inspect", " C
, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );color:transparent;-webkit-background-clip: text;font-size:5em;‘);
The pace of various moves ~
You don't need to worry about the intensive code above.console.log()The second parameter is purely CSS used to control the style. The first parameter can contain escape commands starting with a percent sign, such as%cCommand. For more instructions, see the table in the official API documentation.
If it i
, #2ff), color-stop(0.6, #2f2),color-stop(0.75, #2f2), color-stop(0.9, #ff2), color-stop(1, #f22) );color:transparent;-webkit-background-clip: text;font-size:5em;‘);
The pace of various moves ~
You don't need to worry about the intensive code above.console.log()The second parameter is purely CSS used to control the style. The first parameter can contain escape commands starting with a percent sign, such as%cCommand. For more instructions, see the table in the official API documentation.
If it i
), color-stop(0.9, #ff2), color-stop(1, #f22) );color:transparent;-webkit-background-clip: text;font-size:5em;‘);All kinds of strokes of the rhythm Ah ~Look at the dense code above do not panic, the console.log() second parameter is all pure CSS to control the style, you will not be unfamiliar. In the first argument, you can take an escape instruction that begins with a percent sign, such as the command used to output a styled text above %c . See the official API documentation for this table for
Transferred from: Http://www.cnblogs.com/Wayou/p/chrome-console-tips-and-tricks.html#homeChrome's developer tools are strong enough to have no friends, especially with its rich interface-friendly console, which can be used with the following benefits:
Higher "force lattice" faster development and debugging "stronger" into the class of frontender"
Bug
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.