Saturday 30 December 2017

html - Find JavaScript handler connected to a button's click event





During some code investigating, I found a html submit button like
this:






I
know somewhere there is javascript code that handeles the button
click event. How can I find that javascript
code?



Answer




In
Firefox:





  1. F12

  2. Find
    the line you want to inspect

  3. Click on the small
    ev button at the end of the line (if there is nothing then
    no JavaScript is linked)

  4. See what is linked to
    it



In
Chrome:





  1. F12

  2. Click
    on the line you want to inspect

  3. Click on the
    "Event Listeners" Tab (where you see the styles by
    default)

  4. There you can see the linked
    events



In Edge:




  1. F12


  2. Click
    on the DOM Explorer tab

  3. Click on the line you want to
    inspect

  4. Click on the "Events"
    Tab (where you see the styles by default)

  5. There you can
    see the linked events



No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...