HTML <input> popovertarget attribute
Definition and Usage
popovertarget
The attribute allows you to reference a popup element with a specified id and switch between displaying and hiding:
popovertarget
The attribute is only type="button"
is valid.
See Also:
HTML Reference Manual:HTML popover Attribute
HTML Reference Manual:HTML Input popovertargetaction Attribute
Example
Use the popovertarget attribute to refer to a popup element to display/hide the specified popup element:
<h1 popover id="myheader">Hello</h1> <input type="button" popovertarget="myheader" value="Click Me!">
Syntax
<input type="button" popovertarget="element_id">
Attribute Value
Value | Description |
---|---|
element_id | The id of the popup element related to this button. |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
114 | 114 | Not Supported | 17 | 100 |