Embed website in an iframe and hide certain elements

时光怂恿深爱的人放手 提交于 2019-12-25 06:05:12

问题


I have a client that wants to be able to embed their website into their distributors websites.

Basically inserting it in an iframe. But they want certain elements of their website that are normally visible to not appear on the embedded version.

Is there a way to embed a website in an iframe and use css to hide specific div id's to achieve this?


回答1:


you can use following code in java script to manage element of a iframe

frame.contentWindow.document.getElementById or
frame.contentDocument.getElementById


来源:https://stackoverflow.com/questions/30566295/embed-website-in-an-iframe-and-hide-certain-elements

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!