Simon Willison’s Weblog

Items tagged getelementsbyselector in 2003

Filters: Year: 2003 × getelementsbyselector ×


getElementsBySelector()

Inspired by Andy, I decided to have a crack at something I’ve been thinking about trying for a long time. document.getElementsBySelector is a javascript function which takes a standard CSS style selector and returns an array of elements objects from the document that match that selector. For example:

[... 172 words]

Types

Years

Months

Tags