Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

parentelement javascript

//let element = document.getElementId('elementId');
//let parentElement = element.parentElement;

const element = document.body; // element = <body>...</body>
const parentElement = element.parentElement; //parentElement = <html>...</html>
 
PREVIOUS NEXT
Tagged: #parentelement #javascript
ADD COMMENT
Topic
Name
9+9 =