Home  >  Article  >  Web Front-end  >  如何从本地网站获取对方的div内的内容_html/css_WEB-ITnose

如何从本地网站获取对方的div内的内容_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:17:521311browse

如何从自己的网站 调用对方网站里的 div 里面的内容
我想从自己的网站调用对方网站里 

 里面的内容,请问如何实现!
如何从本地网站获取对方的div内的内容_html/css_WEB-ITnose


另外又能保证对方div带有css

回复讨论(解决方案)

把别人的拷贝到你本地,带样式一起考下来就行了。调别人的div和样式。这个还没听过。。

把别人的网页内容加载到你的本地或iframe内,然后用正则或字符串的方式来取你所要的内容,应该可行,具体写法你自己发挥吧

WebRequest试试看

WebRequest试试看

请问如何实现?

不知道楼主想要做什么。

你想要把别人的div抓过来在你的网页上显示,而且还要保证其原来的样式?

用iframe吧,或者研究下别人的代码,把css样式自己写一份。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn