No var in js

This commit is contained in:
Michel Roux 2019-12-11 21:04:20 +01:00
parent 3d88dd7979
commit 57dd8d6a2f

View File

@ -29,8 +29,7 @@
<script> <script>
document.getElementById('name').oninput = function (choice) { document.getElementById('name').oninput = function (choice) {
var datalist = document.getElementById('animes').childNodes; document.getElementById('animes').childNodes.forEach(function (option) {
datalist.forEach(function (option) {
if (option.value === choice.target.value) { if (option.value === choice.target.value) {
document.getElementById('folder').value = option.dataset.folderId; document.getElementById('folder').value = option.dataset.folderId;
document.getElementById('keyword').value = option.dataset.keyword; document.getElementById('keyword').value = option.dataset.keyword;