selladurai selladurai - 2 years ago 158
Javascript Question

How to create list in HTML dynamically?

In my jQuery mobile app, I want to display the result from a web service in a list. How do I create the list dynamically?

Answer Source
var arr = ["list", "items", "here"];
for(var i in arr) {
    var li = "<li>";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download