DOM XPATH获取img src值的query时间:2021-08-27 20:31:56 复制代码 代码如下: $nodes = @$xpath->query("//*[@id='main_pr']/img/@src"); $prurl = $nodes->item(0)->nodeValue;