New course! Every coder should learn Generative AI!
Try a free lesson+ 1
can i use "selector" without id or class for special tags? ex. "iframe"
hi... i have too much iframe on my html page without any id or class is there any way to select iframe tags automaticly... or some tricks...?
2 Answers
+ 11
document.getElementsByTagName("iframe")[index]
+ 1
document.querySelectorAll("iframe")[index];
... also works, and in JQuery, something like:
$("iframe").get(index);
... should do the trick ^^