This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Event onclick for a button tag HTML  RSS feed

 
Ranch Hand
Posts: 429
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Where can be stored the code of onclick for an button HTML?

I saw on many sites that If I see 'View Source fro a web page' can't see if an button have event attached.

So, I saw that in Developer Tools of a browser that can see if a button have an attached event.

Thanks a lot,
 
Saloon Keeper
Posts: 8734
162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the HTML page links to a JavaScript file, the script may attach event handlers to the page's DOM. you should check the JavaScript files that the page links to, or <script> tags inside the HTML page.
 
Author and ninkuma
Marshal
Posts: 66610
161
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In DevTools inspect the button element in the Elements pane. Its event listeners should be listed under the Event Listeners tab.
 
Dana Ucaed
Ranch Hand
Posts: 429
6
Netbeans IDE Oracle Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the button has not event listed in Developer tools  can say that that button haven't events?

I inspected the Compose button for Yahoo email and I can't see any events.

But Yahoo login page is very complicated.



 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66610
161
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then you'll likely need to follow Stephan's advice and inspect the source.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!