Document Object
The getElementById() method accesses the first element with the specified id.
| Parameter | Description |
|---|---|
| id | Required. The id of the element you want to access/manipulate |
![]()
The getElementById() method is supported in all major browsers.
Alert innerHTML of an element with a specific ID:
Document Object
Your message has been sent to W3Schools.