test.json文件中的信息如下,使用jquery读取该文件并输出图1

 

输出表格呗这个参考这个

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <table id="tab" border="1">

    </table>
</body>
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>
    let json=[{ID:1222,TagName:"88",Time:"2020",Value:"99"},{ID:1223,TagName:"88",Time:"2021",Value:"99"}];
    let html="";
    let head="<tr><th>ID</th><th>TagName</th><th>Time</th><th>Value</th></tr>"
    for(var i=0;i<json.length;i++){
       html+=`<tr><td>${json[i].ID}</td><td>${json[i].TagName}</td><td>${json[i].Time}</td><td>${json[i].Value}</td></tr>`;
    }
    $('#tab').html(head+html)
</script>
</html>