Results 1 to 2 of 2

Thread: onclick image

  1. #1
    bop97 is offline Member
    Join Date
    Nov 2016
    Rep Power

    Default onclick image

    So i have to do this exercise where i am asked to when the user clicks on a image, that is not a button, it changes to another image and i also have to limit the amont of times i can click it. I need to limit it to 3 options, and i have no ideia how. Can anyone give me a hand? here goes my code.

    <h1 style="text-align:center;">Apostas</h1>

    <p style="text-align:center;">
    <img id="n1" src="1.png" onclick="A()">
    <img id="n2" src="2.png" onclick="B()">
    <img id="n3" src="3.png" onclick="C()">
    <img id="n4" src="4.png" onclick="D()">
    <img id="n5" src="5.png" onclick="E()">
    <img id="n6" src="6.png" onclick="F()">

    function A()
    function B()
    function C()
    function D()
    function E()
    function F()

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: onclick image

    Moved. Java != javascript
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. JSF Manipulate onclick value
    By alafarm in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 09-28-2012, 11:17 PM
  2. OnClick Image for Robot arm interface
    By ApheoXAIO in forum New To Java
    Replies: 1
    Last Post: 08-25-2010, 12:33 AM
  3. help with onclick
    By unplugged in forum Java Applets
    Replies: 4
    Last Post: 12-15-2009, 01:24 AM
  4. use of onclick function
    By m4tt in forum New To Java
    Replies: 1
    Last Post: 02-16-2008, 04:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts