繁体   English   中英

将动态表从一个HTML页面传递到另一HTML页面

[英]Pass Dynamic table from one html page to another html page

我已经通过在一个html页面中动态添加行来创建html表,我需要使用javascript从另一页访问整个表以删除所选行表单表,有人可以帮助我解决这个问题吗?

first.html中,假设您的表位于名为“ mydiv”的div中

<div id='mydiv'>
<table> .... </table>

</div>

现在,在转到“ second.html”之前,请在“ first.html”中的javascript中执行此操作

   var htmlcontent = document.getElementById('mydiv').innerHTML;

将htmlcontent设置为名为“ mycookie”的cookie

second.html中

   get htmlcontent from cookie
   set it as innerHTML of a div 'destinationdiv' in second.html

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM