• Friday , 15 December 2017

JavaScript beginner tutorial 24 – referencing elements in JavaScript

Code Canyon

In this tutorial I show you to reference elements on your web page using the document.getElementById() method.

Don’t forget to subscribe:

For collaborations and business inquiries, please contact via Channel Pages: http://ChannelPages.com/QuentinWatt Social links:
Add me on twitter:

facebook group:

Original source

3d Ocean

Related Posts


  1. Shady Eita
    July 30, 2017 at 18:44

    How do you REVERSE the process where when I click on " That tickles " it will reverse to " click me " ?

  2. Ashraf vai
    July 30, 2017 at 18:44

    Thank you man! You are just awesome….

  3. Maria Florencia
    July 30, 2017 at 18:44

    Wow, you explained it very well! I recommend this tutorial to everybody!

  4. ishani desai
    July 30, 2017 at 18:44

    +Quentin Watt Tutorials can the on click event and id function be used in JavaScript

  5. Matt Nilsen
    July 30, 2017 at 18:44

    great tutorial Quentin very much helpful after the message i sent you the other day 🙂

  6. tudu
    July 30, 2017 at 18:44

    Hi. Nice videos!!
    I have a query however, which I don't understand the logic behind.
    The code between <p> and </p> and its relation, so basically why did you define id = "para"? How is it co0ordinating with the JS script ?

  7. William Budd
    July 30, 2017 at 18:44

    Thank you so much, this video cleared up a lot of what I was confused about (relationship among objects, properties and methods). Terrific!

  8. Akul Saini
    July 30, 2017 at 18:44

    love the way you explain mate!! much better than our professor. Keep up the good work 🙂

  9. Sven Mozsar
    July 30, 2017 at 18:44

    Thank you so much for your efforts!

  10. vijay kalyan
    July 30, 2017 at 18:44

    broo…ur teaching is awsuummm..lovedddd it!!!!!

  11. Art MK
    July 30, 2017 at 18:44

    So in para.innerHTML = "This tickles" the "innerHTML" is property (not a method) is that correct?

  12. Vijaya Raju M
    July 30, 2017 at 18:44

    i did what you told but i dont have the smae results. when i click the pragraph it doesnt change and i tried it both ways
    can you please help me

  13. Dan Eker
    July 30, 2017 at 18:44

    This was great!

  14. sourav podder
    July 30, 2017 at 18:44


  15. Alexander Nejadeh
    July 30, 2017 at 18:44

    Another very informative video…

  16. pmburu0
    July 30, 2017 at 18:44

    Thank you. Great job

  17. John Richardson II
    July 30, 2017 at 18:44

    Quintin, thanks! You explained things with so much clarity.

  18. John Richardson II
    July 30, 2017 at 18:44

    Quintin, thanks! You explain things with so much clarity.

  19. Kofi Arhin
    July 30, 2017 at 18:44

    took me more than 8 years to learn this. Thanks Thats an awesome tutorials

  20. Hasrat Sabit
    July 30, 2017 at 18:44

    Hello Quentin. Thank you very much for everything you do here. It is very generous of you that you put the time and energy to help others. I have a question. Along watching your tutorials, I am also reading the popular javascript and jquery book by Jon Duckett. In his book he says that innerHTML method can cause a lot of security risk to the website. He doesn't recommend this method. What is your thought on that? Thanks

  21. Enki's
    July 30, 2017 at 18:44

    hello Mr. Watt.. please let me ask you something:
    is there a way to run 2 event on the same object? one following the other? let me explain my self, if you use the same example of this video but instead of use the event onclick you use the event onmouseover, then it run the function, but when the mouse quit hovering, with the event onmouseout, make the paragraph go back to the original state. i hope i explained my self and would be possible for you to answer me… thank you for your video tutorials…

  22. Nano24
    July 30, 2017 at 18:44

    How to make onclick event in javascript?

  23. Wideband Records
    July 30, 2017 at 18:44

    +Quentin Watt Nice video's, my lil girl somewhat respects Yt for the odd videos but I would like her to get to get more out of YouTube if so, so I rate your tutorials, they are nice and clear as I am a 20 year programmer myself I can honestly say you have great teaching skills and knowledge, most of all I am happy you keep the language clean but if you were to say something odd I totally understand frustration now n then 🙂

  24. Neon Vision
    July 30, 2017 at 18:44

    If anyone is interested in the oculus rift virtual reality headset there is this 3d web browser called janusvr that is looking for more programmers or game devs to help come expand it so if anybody is interested in helping expand the 3D web check it out. it's easy as 3 steps to have your own 3D space where you can put music, pictures, 3D objects, and animations. just search janusvr on youtube if you want to see what it looks like! i believe this is the next big thing. Also it's multiplayer so you can hop in with friends and search the web together. You can also import your own 3d avatars

  25. Duke Nukem
    July 30, 2017 at 18:44

    I like how you explain things very clearly and methodically, really helps, thanks!

  26. Craig Hindmarsh
    July 30, 2017 at 18:44

    document.write("cheers Quentin");

  27. Bruno Lucena
    July 30, 2017 at 18:44

    Hi Quentin, I'm having a problem I can't handle (I've been trying for a few days)… What I'm trying to do is to put the onClick event on a separate .js file. I've been working with a separate script for all your videos, and it worked until now. My HTML code is the same as yours but using src = "mainscript.js" in the script tag. Also, I removed the onclick from the p tag. Now, my JS code is this:

    var para = document.getElementById("para")
    para.onClick = change;

    function change(){
        para.innerHTML = "That tickles";

    Does someone happen to know what the problem is?

  28. Knowideer
    July 30, 2017 at 18:44

    When do we use double and single quotes in javascript?

  29. William A-D
    July 30, 2017 at 18:44

    I see you already have point me to the property's

  30. MrRicardo141
    July 30, 2017 at 18:44

    This Quentin lives in Africa, if he was living here and born here in america, he would be running his own company. Its unfortunate that you might at times feel limited but you over come it. I know javascript, html and php in the future thanks to a guy in Africa.

  31. Saad Souabni
    July 30, 2017 at 18:44

    Keep it up 🙂

  32. Raul d'Ablaing
    July 30, 2017 at 18:44

    I'm enjoying your tutorials. Thank you Quentin!

    July 30, 2017 at 18:44

    FINALLY! i've been going through every JavaScript tutorial wondering to myself WHERE THE FUCK AM I GOING TO USE THIS STUFF?! now it gets exciting.

  34. corno de Bruin
    July 30, 2017 at 18:44

    So understandably.
    Thanks for all the Videos man!

  35. Marty BoneIdol
    July 30, 2017 at 18:44

    I've been followings these on and off for a little while. You teach at a good tempo, especially for an old boy like me!

  36. Steinadler X
    July 30, 2017 at 18:44

    nice up man

  37. Narendran N V
    July 30, 2017 at 18:44

    Is innerHTML method only applicable to <p> tags or can it be applied to others..like for example i need add some tags into a div using JS with the help of innerHTML is that possible ?? i know should be trying this out or browsing..but for the sake of others who might have this doubt em asking here..

Leave A Comment

You must be logged in to post a comment.