Convert jquery code to native js code

window.parent.$ (".clildFrame .layui-tab-item.layui-show"). Find ("iframe") [0] .setAttribute ("src", href);

how is this code written in native js? Hope to be compatible with IE8. PS:document.getElementsByClassName does not support IE8-sharp-sharp-sharp problem description

Jun.09,2021

var parent = window.parent

parent.document.getElementsByTagName('div') //classNameclass,iframe

var arr = [],_dom = document.getElementsByTagName('*');
for(var i=0;i<_dom.length;iPP){
    if(_dom[i].className == 'opts-group') arr.push(_dom[i])
}

Select all nodes. And then traverse. Determine whether their class meets the requirements. Save it if it fits. What you need is to find iframe and then do the operation, so you don't need to save it, just OK it directly.

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ead19f-47f03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ead19f-47f03.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?