Home » Javascript27 November 2009

Javascript: Show/Hide HTML elements

Here, I will be demonstrating on showing or hiding a div when a link is clicked. I have done this with Javascript and CSS.

I have called showHideDiv() Js function when the link is clicked. The display of the div where content is present, is visible or hidden on each click. For this, CSS styling is used (display: none).

The code follows:

Hope it helps. Thanks.

Javascript

Get New Post by Email

Find me on

FacebookTwitterGoogle+LinkedInRSS Feed
  • Excuse me, I wanted to ask, how to make rotate image in PHP or HTML?
    please reply :(

    –Thank You Very Much–

  • Vynum

    Ya but were is the URL code? When someone clicks, how can I send them to a URL location? I want this action in my website but I want it when someone clicks a button/image link to actually load that URL/website inside of a . Could you please modifiy the code and show how this is done?