I want to force a `filter` into all `img` tags in page by pushing a button. Number of images varies in different pages. I came this far:

```
function ccbfunction(wt) {
    var w = document.getElementsByTagName("img");
    var z;
    if (wt == 0) {
        z = "#e0e0e0";
    } else {
        z = "#fff";
    };
    w[0].style.filter = "brightness(80%)";
}

```

Now it's just working on first image and I don't know how to select all the `<img>`s. The number of images isn't constant so I don't use `for` loop.