Reference table from another HTML page - Javascript Browser Object Model

Javascript examples for Browser Object Model:Window localStorage

Description

Reference table from another HTML page

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){//  w ww  . j a va2  s  . c om
var tableHTML = window.localStorage["sharedTable"];
var table = document.createElement('table');
table.innerHTML = tableHTML;
console.log(table.outerHTML);
    }

      </script> 
   </head> 
   <body> 
      <h1>Page 1</h1>  
   </body>
</html>

Related Tutorials