I added if (windows = id | ....){do nothing} but it doesn't work.
var html;
var windows = document.getElementsByClassName("windows");
for (var i = 0; i < windows.length; i++) {
var win = document.getElementById(windows[i].id);
if(win.id == "windows-s" || win.id == "windows-f" || win.id == "windows-p"){
}else{
var win_el = document.getElementById(win.id).id;
win_el.forEach(function(div){
div.removeAttribute("style");
var clonedDiv = div.cloneNode(true);
var inner_HTML = clonedDiv.innerHTML;
html += "HTML"+ i++ +"=" + inner_HTML + ",";
)}
}
console.log(html);
}
Code takes parent(windows) innerHtml and changes attributes with each child. After that, it creates result html1 = innerhtml, html2 = innerhtml, html3 = innerhtml etc... Everything works fine, but now I need to avoid some windows by their id. I added if (windows = id | ....){do nothing} but it doesn't work.
Details are commented in example