首页 > 代码库 > [Debug] Chrome Devtools: Elements - Console Integration

[Debug] Chrome Devtools: Elements - Console Integration

The Element Inspector in Chrome DevTools offers powerful integration with the console - learn how to programmatically navigate your selected element, how to search through the history and use CSS selectors to control what you‘re looking at and how to quickly and easily listen for events as you debug your application.

 

$0: refer to selected element.

$1, $2, $3, $4: refer to previous element.

 

We can use jQuery even not include the lib:

技术分享

 

We can use xPath to get the elements:

技术分享

 

We can monitor events:

技术分享

 

[Debug] Chrome Devtools: Elements - Console Integration