douxi3432
2014-04-09 16:32简单的HTML dom css选择器无法正常工作
in reference to http://simplehtmldom.sourceforge.net/
I have this code:
require_once('simple_html_dom.php');
$x = '<span style="font-family:symbol">®</span>';
$dom = str_get_html($x);
$lis = $dom->find('[style=~font-family:symbol]');
print_r($lis);
Which tries to find tags whose style has the font-family:symbol in it using a css selector.
However this returns nothing.
What is wrong with my code?
- 点赞
- 回答
- 收藏
- 复制链接分享
2条回答
为你推荐
- 简单的HTML dom css选择器无法正常工作
- dom
- css
- php
- 2个回答
- 附加后Jquery选择器不工作
- html
- jquery-selectors
- php
- jquery
- dom
- 3个回答
- jquery初学,获取button失败,name属性获取不到对象,各位大神来看下,帮忙解决!!!
- jquery
- 0个回答
- 超大型的dom树下,如何根据属性快速定位某一个dom结点?(ext的选择器太慢了)
- javascript
- 0个回答
- 微信小程序js里如何根据id来改变style
- javascript
- 微信
- class
- 5个回答
换一换