【发布时间】:2014-11-19 16:48:55
【问题描述】:
我对简单的 html dom 有疑问 问题是如何抓取内容但没有类和 id [使用简单的 html dom]
例如:
<div style="line-height:15px; float:left; width:100%; margin:2px 0px;">I want grab this text..
<div style="float:left; width:100%; margin-top:5px; font-weight:bold; text-align:left;">text grab2</div>
【问题讨论】:
-
至少试试 something
-
@Ghost 编辑并查看真实来源(我无法正确显示)
-
我只是假设,您想获取那些不具有
id和class属性的div 中的文本? -
是的,我的意思是这样,但感谢 Ghost 的回答。我想获取那些没有 id 和 class 属性的 div 中的文本?
标签: php html dom curl simple-html-dom