jeudi 1 septembre 2016

Jscript error - Why? - Uncaught TypeError: Cannot read property 'remove' of undefined

I have a script to remove uploaded files after Add to succes, but i get this error on site when it loads. "Uncaught TypeError: Cannot read property 'remove' of undefined" Whats missing?

<script>
onload=function() {
    document.querySelectorAll("li[id^='uploadNameSpan']")[0].remove();
}
</script>

Aucun commentaire:

Enregistrer un commentaire