我有一个文件夹里包含 table.html、data.php 和 json.csv 三个文件。
data.php 文件使用
如何在 table.html 中将 JSON 对象显示为表格?
fopen("json.csv","r")
语句来读取 json.csv 文件。如何在 table.html 中将 JSON 对象显示为表格?
<html>
<head>
<script type="text/javascript" src="jquery.js">
function display(){
$.post('data.php',function(data){
$("#txtJSON").html(data);
});
}
</script>
</head>
<body onload="display()">
<table id="#jobtable">
<input type="text" id="txtJSON" />
</table>
</body>
</html>