Dom\ParentNode::querySelector
(PHP 8 >= 8.4.0)
Dom\ParentNode::querySelector — Returns the first element that matches the CSS selectors
说明
   Returns the first element that matches the CSS selectors specified
   in selectors.
  
参数
selectors- A string containing one or more CSS selectors.
 
返回值
   Returns the first Dom\Element that matches
   selectors. Returns null if no element matches.
  
错误/异常
   Throws a DOMException with code
   Dom\SYNTAX_ERR when selectors
   is not a valid CSS selector string.
  
参见
- Dom\ParentNode::querySelectorAll() - Returns a collection of elements that match the CSS selectors
 
  +添加备注
  
 用户贡献的备注
此页面尚无用户贡献的备注。
备份地址:http://www.lvesu.com/blog/php/dom-parentnode.queryselector.php