We would like to know how to create ul and li element.
<!DOCTYPE html>
<html>
<body>
<div id="twitter_status"></div>
<script type='text/javascript'>
<!-- w ww .ja v a 2 s. c om-->
var ul=document.createElement('ul');
for(i=0;i<5;i++)
{
var li=document.createElement('li');
li.innerHTML="<a href=''>Somelink</a>"+" "+"Sometext";
ul.appendChild(li);
}
document.getElementById('twitter_status').appendChild(ul);
</script>
</body>
</html>
The code above is rendered as follows: