Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html>
  <head>
    <script>
      function f(obj) {
        if(obj.style.visibility == "hidden"){
          obj.style.visibility = "visible";
        } else {
          obj.style.visibility = "hidden";
        }
      }
    </script>
  </head>
  <body>
    <p id="test" >Some text.</p>
    <button onclick="f(document.getElementById('test'))">click here!</button>
  </body>
</html>