Dave’s Brain
Home
Search
Browse
Recent
Keywords
Other sites
Feedback
Sign in
Random
Crawlers
Programming Tips
- jQuery: get id of the parent frame
Date:
2024feb10
Language:
javaScript
Q.
jQuery: get id of the parent frame
A.
jQuery:
const
parentId
=
$
(
window
.
frameElement
).
attr
(
'id'
);
Plain javaScript:
const
parentId
=
window
.
frameElement
.
id
;