Yu-Gi-Oh! Deck Building and Card Inventory Management web interface written in Common Lisp, utilizing HTMX.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
403B

  1. <script>
  2. $(document).ready(function() {
  3. const fileInput = document.querySelector('{{ target }} input[type=file]');
  4. fileInput.onchange = () => {
  5. if (fileInput.files.length > 0) {
  6. const fileName = document.querySelector('{{ target }} .file-name');
  7. fileName.textContent = Array.from(fileInput.files).map(x => x.name);
  8. }
  9. }
  10. });
  11. </script>