Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Javascript Tutorial - 24 - Event Handlers Introduction

Loading...

Sign in or sign up now!
29,706
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Oct 17, 2008

http://www.youtube.com/watch?v=Bp0lcXlF7xc&fmt=18

click the link above to watch this video in high def so it isn't fuzzy! and make sure to subscribe to my channel!

http://thenewboston.com

  • likes, 2 dislikes

Link to this comment:

Share to:

Top Comments

  • if you dont learn basics youll kill yourself trying to learn the advanced stuff

  • If you put value="I'm a button" after the onclick the button will have a name.

see all

All Comments (57)

Sign In or Sign Up now to post a comment!
  • @pepparn123 it can be anywhere. It's actually easier to just put < button instead of < input

  • @Kyuunul when working with booleans, an easier way is to simply write "if (confirm)" and "if (!confirm)". The former checks if the boolean exists and/or is defined positively. The latter checks if the boolean doesn't exist (undefined/null) or is defined negatively

  • this guys tutorials are the best and he's friggin hillarious

  • "...make sure its inside your body and not your head"

  • @LordShiding You gotta use an if :D

    like so

    var confirm=confirm("Are you sure you want to procceed ?");

    if(confirm==true){

    alert("You pressed yes/ok")

    }

    else{

    alert("Your pressed no/cancel")

    }

    }

  • @pepparn123

    before the onClick and it will work

  • but how do you get text on a button? like on an alarm box, like yes or no options?

  • You are a GOD!!!

  • It is normally better to call a predefined function from the event listener, especially if it calls more than one line.

  • dude, ur tutorials are OUTSTANDING !!!!!!!

View all Comments »
Loading...

0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more