如何使用ajax刷新表中的数据?

I'm new to ajax. I just want to simply view my table from the database using ajax. I have 2 files listbarang.html and showlist.php.
Here's my code

PHP (showlist.php)

<?php 
$link = @mysqli_connect("localhost", "root", "","projekpweb");
if($link->connect_errno)
{
    echo "Failed to connect. " . $link->connect_error;
}
$sql = "SELECT * FROM `barang`";
$result = mysqli_query($link, $sql);
if(!$result)
{
    die("SQL GAK KONEK : " . mysqli_error($link));
}

echo "<table>
            <tr>
                <th>idbarang</th>
                <th>nama</th>
                <th>harga</th>
                <th>ekstensi_gambar</th>
            </tr>";
while ($row = mysqli_fetch_array($result))
{
    echo "  <tr>
                <td>".$row["idbarang"]."</td>
                <td>".$row["nama"]."</td>
                <td>".$row["harga"]."</td>
                <td>".$row["ekstensi_gambar"]."</td>
            </tr>";
}
echo "</table>";    ?>

HTML (listbarang.html)

    <!DOCTYPE html>
<html>
<head>
    <title>LIST BARANG</title>
    <script type="text/javascript">
        function showList()
        {
            if(window.XMLHttpRequest)
            {
                xmlhttp = new XMLHttpRequest();
            }
            else
            {
                xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xmlhttp.onreadystatechange = function() {
                if (this.readyState == 4 && this.status == 200) 
                {
                    document.getElementById("tblList").innerHTML = this.responseText;
                }
            };
            xmlhttp.open("GET","showlist.php",true);
            xmlhttp.send();
        }
    </script>
</head>
<body>
    <div id="tblList">
        <script type="text/javascript">
            showlist();
        </script>
    </div>
</body>
</html>

I wonder why the #tblList doesnt have the content of the the table. Thanks in advance