The console provides two main methods for developers to test web pages and applications:
Diagnose log information by using console APIs provided by the console, such as console. Log () and console. Profile ().
The instant response command window can be jointly tuned with doc
Read Catalogue
Write in front
Google console elements panel
See what the elements are bound to
Style actions
General Conditions
Console.log
Console.info
Console.error
Console.warn
Console.debug
Console.dirxml
Console.group and Console.groupend
Console.assert
Console.count
Console.dir
Console.time and Console.timeend
Console.profile and Console.profileend
Console.timeline and
Label: blog HTTP Io ar use Java SP strong Div
Console API
When you open firebug (which also includes built-in debugging tools for chrome and other browsers), the window will register an object called console. It provides multiple methods to output information to the console for developers to debug and use. The foll
function definition: Ctrl + Shift + 0 (under scripts panel)
Find the file: Ctrl + O (under the scripts panel)
More Shortcut Keys: Press? In Chrome developer Tool? View help
8. Command Line API
$ (Id_selector) is irrelevant to jquery on the page.
$ (Css_selector)
$0, $1, $2, $3, $4
The last five elements selected in the elements panel are $0.
These five variables are first-in-first-out.
Copy (STR) Copies
console.log(‘%chello world‘, ‘background-image:-webkit-gradient( linear, left top, right top, color-stop(0, #f22), color-stop(0.15, #f2f), color-stop(0.3, #22f), color-stop(0.45, #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;‘);
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 cont
variable is a first-in-one
Copy (str) copies str to clipboard, which is useful when copying variables at breakpoints
Monitorevents (Object[,types])/unmonitorevents (Object[,types])
Outputs the event object in the console when the types event occurs on object
For more console API please console.log (console) or click
More Co
The console in chrome developer tools can be displayed on any panel. You can click the following button or Press ESC.
The console has many purposes, unlike other panels.
You can use the firebug command line API in the console.
Common commands:
(1) $ ("ID") displays the elements of a specific ID;
(2) $0, returns the ele
The Element Inspector in Chrome DevTools offers powerful integration with the Console-learn what to programmatically Navi Gate your selected element, how to search through the history and use CSS selectors to control what do you ' re looking at and How to quickly and easily listen for events as you debug your application.$0:refer to selected element.$, $ $, $ $4:refer to previous element.We can use jQuery e
(Click the public number above for a quick follow-up)
Compilation: Bole Online/Sun Tenghao
If you have a good article to submit, please click here to learn more
Chrome has built-in developer tools. It has rich features, such as elements (Elements), network, and security. Today, we focus primarily on the JavaScript console.
When I first wrote the code, I only used the JavaScript
Let's take a look at what the console has to offer for debugging purposes.Console APIWhen opening Firebug (which also includes a browser's own debugging tools such as Chrome), Windows registers an object called console, which provides a variety of ways to output information to the console for debugging use by developer
The above article has outlined the specific aspects of the console object as well as the basic application, here is a brief description of how to use the Chrome console this artifact to properly debug the JavaScript code (this is what we can really use to implement the place)
1, first say the source positioning
Everyone open the test page to see the bottom righ
ArticleDirectory
Chrome Developer Tools: Console
Chrome Developer Tools: Console
Accessible from any panelConsole. Unlike other panels,ConsoleIt can be used to check Dom, debug JavaScript, or analyze HTML parsing errors.
Follow these steps to learn moreConsole:
Open the Google closure hovercard
The above article has outlined the main aspects of the console object and basic applications, the following is a brief introduction to how to use the chrome console this artifact good debugging JavaScript code (This is what we really can be used to implement the place)1, first talk about the source locationDo you see a recommended icon on the bottom right of the
$The $_ command Returns the result of the most recent expression execution, with the same function as pressing the UP ARROW key again, but it can be used as a variable in your next expression.$ ~$4 represents the last 5 DOM nodes you have chosen. Right-click on the page to select 审查元素 , and then in the pop-up DOM node tree above the random click, these points are the point of the nodes will be recorded, and $0 will return the most recent point selected DOM node, and so on, and so on, returned th
$The $_ command Returns the result of the most recent expression execution, with the same function as pressing the UP ARROW key again, but it can be used as a variable in your next expression.$ ~$4 represents the last 5 DOM nodes you have chosen. Right-click on the page to select 审查元素 , and then in the pop-up DOM node tree above the random click, these points are the point of the nodes will be recorded, and $0 will return the most recent point selected DOM node, and so on, and so on, returned th
Today, when developing a Web application, write a small function with Javascipt to do the following things:
That is, change the Bille coefficient, the back of my hospital accounted for automatically change. The function is very simple, with onchange= "" can be implemented, but my code is as follows:
Code 1:
wyzb("Wyzb This is to call JS code, JS code is as follows:
Code 2:
But the Web page just does not execute this JS code, with the Chrome
Use the chrome browser's console to debug the front-end page, chromeconsole
Html for testing:
If we directly modify the code on the html page and refresh the browser, the operation is very troublesome, and the modification error still needs to be modified back, it is better to debug it directly in the browser.
Use ctrl + shift + j in chrome to call the
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.