There are 4 occurrences of "innerHTML" and 3 occurrences of " onclick='" so I replaced those two substrings with H and o.
The whole HTML is rendered using an ES6 template literal (document.write(` ... `))
Everytime a ${H} or a ${o} is present in the template, the value of H or o is copied here.
It's a native feature of JS since ES6.
Besides that, the second <a> implicitly closes the first <a>, so no need to use </a>. The id's are global, that's why we can access i.value or u.innerHTML directly. In onclick, "this" (the current element) is implicit. Finally, the strikethrough is done using the (deprecated but still working) .strike() String method.
<script>document.write(`<input id=i><a${o=" onclick="}'u.${H="innerHTML"}+="<li${o}${H}=${H}.strike()>"+i.value'>+<a${o}u.${H}="">x</a><ol id=u>`)</script>
Demo: https://codepen.io/xem/pen/dypVzaw?editors=1100
Cheers :)