Name
HTMLElement.contains( ) — whether one element is contained in another
Availability
Internet Explorer 4
Synopsis
element
.contains(target
)
Arguments
-
target
An HTMLElement object.
Returns
true
if element
contains target
; false
if it does not.
Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.