list changing with javascript
I'm using 开发者_运维技巧MooTools.
I have a ul
element:
<ul id="alerts"></ul>
And I can access it with $("alerts")
, but when I try to change it by doing:
$("alerts").innerHTML += "<li>word</li>";
In a for
loop, it only does the first... It doesn't add any more li
tags. Full code here: rightandrong.info/Upload.html
. I've modified it so it doesn't actually upload.
Drag and drop multiple files, and it should tell you when each one is done in the ul
. What's wrong?
EDIT: Checking the full code is recommended.
That's why you can't do it
Regarding your problem: on the js fiddle I did it's working, are you sure the loop contains something more than one element? (on your example it's working too)
精彩评论