HTML/Javascript Odd One Out Button Game Primer Tutorial

HTML/Javascript Odd One Out Button Game Primer Tutorial

HTML/Javascript Odd One Out Button Game Primer Tutorial

We’ve got a really simple HTML and Javascript game for you today. Tend to think the simplest “game” concepts involve those that just involve pressing a button … it’s primal, man person. And so, because it involves just this, essentially, we offer a dual mode scoring mechanism …

  1. the usual one point for one correct answer … or …
  2. a weighted “one point for one correct answer” depending on how fast you answer

… the setting for which comes from an HTML select “dropdown” element.

The Javascript DOM uses lots of code like …


orderpick = Math.floor((Math.random()*(words.length))+0);

… which, in layman’s terms, “takes an array called words and randomly picks a value with equal weight given to each member’s chances”.

Game coding in Javascript and in other computing languages relies on function’s like Javascript’s “Math.random()” to try to make computers act like people … be random … chortle, chortle.

We use an HTML table element to house the three button choices of our “Odd One Out” game today because we just find it the easiest way to keep things in columns, but you could use HTML div elements, and you’ll find a lot of advice going that way around the “net”. But I’m, personally, working on the butterflies, particularly those in Brazil, who seem to be coming around to my way of thinking … but we digress.

As mentioned earlier … “we’ve got a really simple HTML and Javascript game for you today” … the very fact that it is HTML and Javascript inherently means it has some weaknesses regarding the possibilities for users to be spoilsports and find the answers ahead of time. Perhaps you are doing that now?! It’s up to you whether you decide to involve a functionality like “Ajax jQuery” (we talked about with Ajax jQuery Primer Tutorial) or bring in a server side language like PHP (or ASP.Net) to “keep things tight” this way. If we decide, on this game, to “keep things tight” we’ll add to this game’s tutorial “thread”.

But for now we hope you get something out of studying the HTML and Javascript programming source code you could call odd_one_out.html with this live run link.

If this was interesting you may be interested in this too.

This entry was posted in eLearning, Games, Tutorials and tagged , , , , , , . Bookmark the permalink.

16 Responses to HTML/Javascript Odd One Out Button Game Primer Tutorial

  1. Great amazing issues here. I am very happy to see your article. Thank you so much and i am taking a look ahead to touch you. Will you please drop me a e-mail?

  2. I appreciate, cause I discovered just what I used to be taking a look for. You have ended my four day lengthy hunt! God Bless you man. Have a great day. Bye

  3. Truck says:

    You made a few nice points there. I did a search on the matter and found a good number of folks will have the same opinion with your blog.

  4. Well I definitely liked studying it. This post procured by you is very practical for accurate planning.

  5. Sonni says:

    you are actually a excellent webmaster. The website loading velocity is amazing. It sort of feels that you’re doing any distinctive trick. Furthermore, The contents are masterwork. you have done a great job on this subject!|

  6. Valuable information. Fortunate me I found your site by chance, and I’m shocked why this accident did not happened earlier! I bookmarked it.

  7. A lot of thanks for your whole effort on this blog. My aunt really loves making time for investigations and it’s easy to see why. We notice all relating to the compelling mode you create valuable secrets by means of your web blog and attract response from other individuals about this concept while our own simple princess is without question learning a lot. Have fun with the remaining portion of the year. You are conducting a pretty cool job.

  8. I would like to thank you for the efforts you have put in writing this website. I am hoping the same high-grade website post from you in the upcoming also. In fact your creative writing skills has encouraged me to get my own website now. Really the blogging is spreading its wings quickly. Your write up is a good example of it.

  9. Good website! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I could be notified when a new post has been made. I have subscribed to your feed which must do the trick! Have a great day!

  10. new business says:

    I would like to thank you for the efforts you have put in writing this website. I am hoping the same high-grade blog post from you in the upcoming as well. In fact your creative writing skills has encouraged me to get my own website now. Actually the blogging is spreading its wings quickly. Your write up is a great example of it.

  11. Normally I don’t read post on blogs, but I would like to say that this write-up very pressured me to take a look at and do so! Your writing taste has been surprised me. Thanks, very great post.

  12. In case one runs short of storage space, the best alternative is to make use of the various storage devices available in the market to store the data. Once you master the buying skills of online shopping, you can very well enjoy loads of benefits like finding wider range of colors, dresses, designs, cuts and other things for your bridesmaid dresses. The only thing which is required by such plans from your side is patience and commitment.

  13. I’m curious to discover out what blog system you take place to be utilizing? I’m experiencing some minor security problems with my latest webpage and I’d prefer to uncover anything far more safe. Do you’ve got any recommendations?

  14. Super-Duper website! I am loving it!! Will come back again. I am taking your feeds also

  15. This is the right webpage for everyone who hopes to find out about
    this topic. You know a whole lot its almost
    hard to argue with you (not that I personally would want to…HaHa).
    You certainly put a new spin on a topic which has been written about for years.

    Excellent stuff, just excellent!

Leave a Reply to Sonni Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>