call html code from javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mickey0
    New Member
    • Jan 2008
    • 142

    call html code from javascript

    Hello,
    odd question maybe; I wonder if it's possible write the code for a page like this:
    Code:
    <script>
      function jsfunc() {
          ShowTable();
       }
    </script>
    <input type="text" onClick="jsfunc()" />
    //hidden table:
    <table>
    <tr>
     <td> Hello </td>
     <td> Hello </td>
    </tr>
    
    <tr>
     <td> Hello </td>
     <td> Hello </td>
    </tr>
    </table>
    So I want hide a part of html code; when I push on the "input" I want the table appear on the page (without delete anything that was visible before on the page).
    Is it possible?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    It should be doable. maybe the easiest way is setting/changing the display property of the table element.

    Comment

    Working...