Embed part of website
46,791
Solution 1
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;
Hope this helps.
Solution 2
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.
Author by
Admin
Updated on July 09, 2022Comments
-
Admin almost 2 years
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!