How can I get grandchildren div and iframe of a document in javascript ? I have the id of div and name of iframe
Example:
document.querySelectorAll("#iframeId .someSelector");
If you have an ID for child you can just use that:
document.getElementById("divId");
Or you could use a combination of selectors like so:
document.querySelectorAll("#iframeId > .someSelector > *");