我在同一个文件夹中有一个table.html,data.php和json.csv。用json值填充html表格
data.php正在做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>
你有没有试图自己写任何代码?如果是这样,请分享它,并让我们知道它不工作的方式。 – GordonM 2011-04-25 14:45:26
是json.csv JSON还是CSV?他们是两种不同的格式... – ceejayoz 2011-04-25 16:12:41