<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Tiêu đề</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(function(){
    function testFn(list) {
        var a = [];
        for (var i = 0; i < list.length; i++) {
            a.push(list[i].innerHTML);
        }
        $('span').text(a.join(" "));
    }
    testFn($('li').get());
});
</script>
</head>

<body>
<ul>
<li>Thành phần li thứ 1</li>
<li>Thành phần li thứ 2</li>
</ul>
<span></span>
</body>
</html>

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.