InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Chrome developer tools

  • Chrome - copy as cURL
  • Chrome - how to access pre-release features
  • Chrome - useful internal urls (chrome://)
  • Chrome - view javascript errors
  • Edit and debug css in Chrome
  • How to detach Chrome developer tools window
  • View http headers in Chrome
  • clear Chrome HTTP 301 redirect cache
  • custom http request headers
  • how to debug :hover
  • how to debug javascript in Chrome
  • view event handlers in Chrome
 
  • Home
  • > Tutorials
  • > Web Development
  • > Chrome developer tools

view event handlers in Chrome

By admin | Last updated on Mar 18, 2016

Chrome developer tools can be used to view event handlers/listeners on any element in an html page. This is pretty handy to quickly view event handlers on a site without going into its javascript or html code. Here are the quick steps to achieve this:

  1. We’ll use the following html code for the purpose of this article:
    <!doctype html>
    <html>
    <head>
    <title>Chrome developer tools - view event listeners example</title>
    </head>
    <body>
    <h1>Chrome developer tools - view event listeners example</h1>
    <a href="" onclick="alert('foo'); return false;">clickme</a>
    </body>
    </html>
    
    You can see the live example html page at Chrome developer tools – view event listeners example.
  2. First right click on the element you want to see event listeners for. Here we’ll right click on link “clickme”. Then click on inspect element as shown below:
    chrome-right-click-inspect-element
  3. This will open up chrome developer tools. Make sure element tab is selected.
    chrome-developer-tools-element-selected
  4. In the right panel click on even listeners. Click on click event and then click on node “a”. To view the javascript code, you can mouseover the listenerBody function snippet as shown below:
    chrome-developer-tools-event-listeners

Suggested posts:

  1. jQuery jsonp and cross domain ajax
  2. Apache – list loaded modules on Ubuntu
  3. Bash – how to find last command exit status code
  4. How to use fitvids.js for automatically resizing videos
  5. WordPress – query to dump all posts with featured image
  6. Curl – how to hide progress bar
  7. Javascript event bubble vs capture
  8. PHP – assign multi lines string to a variable
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Chrome developer tools, Javascript, Tutorials, Web Development
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress