I need to filter an HTML UL list using a select-box. The code below filters an HTML table using a select-box:

```js
function myFunction() {
    var input, filter, table, tr, td, i;
    input = document.getElementById("myList");
    filter = input.value.toUpperCase();
    table = document.getElementById("myTable");
    tr = table.getElementsByTagName("tr");
    for (i = 0; i < tr.length; i++) {
        td = tr[i].getElementsByTagName("td")[0];
        if (td) {
            if (td.innerHTML.toUpperCase().indexOf(filter) > -1) {
                tr[i].style.display = "";
            } else {
                tr[i].style.display = "none";
            }
        }       
    }
}
```

```html
<select id="myList" onchange="myFunction()" class='form-control'>
    <option value="">YEAR</option>
    <option value="y19">2019</option>
    <option value="y18">2018</option>
    <option value="y17">2017</option>
</select>

<table id="myTable">
    <tr><td><class="y19">Germany</td></tr>
    <tr><td><class="y18">Sweden</td></tr>
    <tr><td><class="y17 y18 y19">UK</td></tr>
    <tr><td><class="y18 y19">Australia</td></tr>
    <tr><td><class="y18">Canada</td></tr>
    <tr><td><class="y18">Italy</td></tr>
</table>
```

I turned the table into an UL but failed to adapt the javascript and make it work. Can anyone help?

```html
<ul id="myUL">
    <li class="y19">Germany</li>
    <li class="y18">Sweden</li>
    <li class="y17 y18 y19">UK</li>
    <li class="y18 y19">Australia</li>
    <li class="y18">Canada</li>
    <li class="y18">Italy</li>
</ul>
```