get parent element in js code example
Example 1: how get parent element javascript
var parent = document.getElementById("myElement").parentElement;
Example 2: get parent id javascript
var x = document.getElementById("ID").parentElement.nodeName;