如何使用简单的html dom获取脚本值?

时间:2015-09-25 12:29:10

标签: javascript php simple-html-dom

我正在尝试获取此内容:

var block = new Block('page_competition_1_block_competition_tables_8', 'block_competition_tables', {"season_id":11663,"round_id":31554,"outgroup":false});

在此页面上:

视图源:http://it.soccerway.com/national/italy/serie-a/20152016/regular-season/r31554/?ICID=TN_02_01_02

其实我制作了这段代码:

$html = file_get_html('http://it.soccerway.com/national/italy/serie-a/20152016/regular-season/r31554/?ICID=TN_02_01_02');

foreach ($html->find('script',0) as $element) 
{
   print_r($element);
}

但是当我打印时,没有season_idround_id,我想得到这个元素的值。我怎么能做到这一点?

0 个答案:

没有答案