开发者

Embed part of website [closed]

Closed. This question needs details or clarity. It is not current开发者_如何学JAVAly accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 3 months ago.

Improve this question

I want to embed just this part on my website. How do I do that? I have tried with iframe and it shows me the whole page I just want the table!

Embed part of website [closed]


If you do know the id of the div the table is in you can do something like this

HTML

<div id="PlaceToPutTable"></div>
<iframe id="iframe" src="urlofpagewithtableonit.html" style="display:hidden;"></iframe>

JavaScript

var iframe = document.getElementById("iframe");
var div = document.getElementById("PlaceToPutTable");
div.innerHTML = iframe.contentWindow.document.getElementById("KnowDivName").innerHTML;


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.


You can copy paste html code like this

<iframe width="500" height="300" style="border:none;" src="https://www.rowshare.com/embed/5ff17f44bcb240e0be061e26c0aca207"></iframe>

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜