Switch to full style
HTML code examples
Post a reply

Hide the background image by one click

Fri Dec 16, 2011 8:43 pm

Following html code using onclick event and the className property of the body tag to remove the background image on user click.

Code:
<html>
<
head>
<
title>Remove the background image by clicking</title>
<
style>
       .type2 { background-image:none;!important }
</
style>
</
head>
<
body  
      bgproperties
="fixed" 
      background
="site_logo.gif" 
      onclick
="this.className='type2'">

Hide the background image by one click.

</
body>
</
html>
    
 




Post a reply
  Related Posts  to : Hide the background image by one click
 Show image when click on link     -  
 Move image in front of a background image     -  
 click,double click,focus,blur and hover actions in JQuery     -  
 No repeated background image     -  
 Start background image from its bottom     -  
 Repeat background image on y axis     -  
 Table background image problem     -  
 Set position of background image in pixels     -  
 Repeat background image on x axis     -  
 right bottom background image position     -  

Topic Tags

HTML Image