Onclick image dissapear.

Author Topic: Onclick image dissapear.  (Read 2944 times)

Offline electraTopic starter

  • Trade Count: (0)
  • Jr. Member
  • **
  • Thank You 8
  • Posts: 88
  • Karma: 1
  • I like SEO
    • Hosting discussion
Onclick image dissapear.
« on: 12-11-2011, 13:32:42 »
Hi, I need to make a picture dissapear onlick using java script. I will be honest I am lost because I'm new to java and I can't find a tutorial for this! I have been experimenting with other onclick uses (alerts etc) but this one is bugging me!


Thanks,
Reliable hosting? try HOSTGATOR and WEBHOSTINGHUB.


Offline Vinil

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 148
  • Posts: 301
  • Karma: 13
  • Gender: Male
  • I can and I Will
    • Boaters Directory
Re: Onclick image dissapear.
« Reply #1 on: 01-10-2012, 00:38:12 »
se you have mentioned two things -java and javascript -For you kind information both are different languages .if you are new to java ,it doesnt matter to javascript
In case you indeed want help in javascript ,this post is relevant to category and i may help you
see in javascript,onclick() event ,disable the visible property on image  and call the function when user click .

Offline Shikha Singh

  • Trade Count: (0)
  • Sr. Member
  • ****
  • Thank You 52
  • Posts: 323
  • Karma: 0
  • Gender: Female
  • solution to start online business
    • solution to start online business
Re: Onclick image dissapear.
« Reply #2 on: 02-23-2016, 00:50:53 »
add this code in your body tag but change "img.png" to your image source

<img src="img.png" onclick="this.style.display='none';" style="position:absolute;opacity:0.5;left:50%;top:50%;width:100px;height:100px;margin-left:25px;margin-top:25px;z-index:100;"/>

 

Related Topics

  Subject / Started by Replies Last post
13 Replies
4612 Views
Last post 04-05-2014, 06:31:07
by kumar29
0 Replies
1129 Views
Last post 09-06-2011, 03:39:25
by Walalayo
0 Replies
1355 Views
Last post 09-06-2011, 03:40:20
by Walalayo
0 Replies
1055 Views
Last post 10-29-2011, 03:47:56
by manvbf
0 Replies
1220 Views
Last post 11-03-2011, 04:39:07
by manvbf