var iframe = document.getElementById("iframe");
var div = document.getElementById("PlaceToPutTable");
div.innerHTML = iframe.contentWindow.document.getElementById("KnowDivName").innerHTML;
If you do know the id of the div the table is in you can do something like this
var iframe = document.getElementById("iframe");
var div = document.getElementById("PlaceToPutTable");
div.innerHTML = iframe.contentWindow.document.getElementById("KnowDivName").innerHTML;
When embedding a table in a website, automatic update can be a challenge. I'd like to propose an alternative tool called RowShare, that allows an automatic update. I explained about this in an article that I wrote. Please feel free to take a look at it: https://www.rowshare.com/blog/en/2017/10/10/How-to-Embed-Tables-in-Your-Website
发布评论
评论(3)
如果您确实知道表格所在 div 的 id,则可以执行类似
HTML
JavaScript 的操作
If you do know the id of the div the table is in you can do something like this
HTML
JavaScript
您可以将从某个 id 开始的外部网站部分放入 iframe 中,例如 this。或者您可以将 iframe 放入 div 中,例如 this。
You can put the part of an external website starting at some id into an iframe, like this. Or you can put an iframe into a div like this.
您可以像这样复制粘贴 html 代码
在网站中嵌入表格时,自动更新可能是一个挑战。我想提出一个名为 RowShare 的替代工具,它允许自动更新。我在我写的一篇文章中解释了这一点。请随意查看:https://www.rowshare.com/blog/en/2017/10/10/How-to-Embed-Tables-in-Your-Website
You can copy paste html code like this
When embedding a table in a website, automatic update can be a challenge. I'd like to propose an alternative tool called RowShare, that allows an automatic update. I explained about this in an article that I wrote. Please feel free to take a look at it: https://www.rowshare.com/blog/en/2017/10/10/How-to-Embed-Tables-in-Your-Website
Astaeka