<button id="hideFrame" data-val="true">Hide frame</button>
bFrame=doc.getElementById("hideFrame");
bFrame.onclick=function () {
var v=this.dataset.val
,d=v?"none":"block",
frames=document.getElementsByTagName("iframe");
console.log(d,v);
for (var i = 0,l=frames.length; i < l; i++) {
frames[i].style.display=d;
}
this.dataset.val=!v;
}
document.querySelector("#hideFrame").addEventListener("click",function(){
document.querySelectorAll("iframe").forEach(function(el){
el.style.display = window.getComputedStyle(el).display == "block"?"none":"block";
});
},false);
iframe{
display:block;
}