I have code for get all frames on page:
var framesets = document.getElementsByTagName('frameset');
for (var i = 0; i < framesets.length; i++) {
console.log(framesets[i])
}
I want get links from frame. Over document I can execute document..getElementsByTagName('a')
, but how to use over frame?
framesets[i].getElementsByTagName('a')
not working.
Thank you for any help
Use window.frames[i].document.getElementsByTagName('a');