开发者

list changing with javascript

开发者 https://www.devze.com 2023-03-26 12:08 出处:网络
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:

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)

0

精彩评论

暂无评论...
验证码 换一张
取 消