The HTML way to do this is <details><summary>1</summary>Footnote text</details> which will inline the footnote and expand it on click; you could move it elsewhere on the page with CSS.
Also, usefully displaying the footnote elsewhere on the page in a useful way is not a trivial task.