change background image

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urgido
    New Member
    • Oct 2006
    • 3

    change background image

    How I can change the background image to <li> tag when is clicked?

    Regards
  • vee10
    New Member
    • Oct 2006
    • 141

    #2
    hi,

    can u explain me ur question i am unable to understand ur question


    Originally posted by urgido
    How I can change the background image to <li> tag when is clicked?

    Regards

    Comment

    • Thevercad
      New Member
      • Oct 2006
      • 26

      #3
      hi,

      try the following code:

      Code:
      <div id="ImgDiv">
          <img src="Img1.gif" />
      </div>
      <div id="LiDiv" style="display:none;">
          <li>
              <ol>List1</ol
           </li>
      </div>
      
      <input type="button" onClick="document.getElementById('ImgDiv').style.display='none';document.getElementById('LiDiv').style.display='block';" />
      
      <input type="button" onClick="document.getElementById('LiDiv).style.display='none';document.getElementById('ImgDiv'').style.display='block';" />

      This is just a possible way. I hope it suits your requirements.

      Comment

      Working...