抱歉,如果这很难阅读,但我无法让它工作。我一直在扫描代码寻找小错误,例如缺少分号和逗号。但是,我不知道是否有什么我做错了,或者我只是错过了一点点花絮。无论。有什么我做错了吗?
我的程序现在可以运行了!非常感谢你,很抱歉这个愚蠢的问题(从票数来看)。谢谢!
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title> WEB204 </title>
<link rel="stylesheet" href="css/master.css">
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
var jsonData = {
"rows" : [
{
"customer_id" : 148,
"customer_name" : "Al's Appliance and Sport",
"street" : "2837 Greenway",
"city" : "Fillmore",
"state" : "FL",
"ZIP" : 33336,
"balance" : 6550,
"credit_limit" : 7500,
"REP_ID" : 20
},
{
"customer_id" : 282,
"customer_name" : "Brookings Direct",
"street" : "3827 Devon"
"city" : "Grove",
"state" : "FL",
"ZIP" : 33321,
"balance" : 431,
"credit_limit" : 10000,
"REP_ID" : 35
},
{
"customer_id" : 356,
"customer_name" : "Ferguson's",
"street" : "382 Wildwood",
"city" : "Northfield",
"state" : "FL"
"ZIP" : 33146,
"balance" : 5785,
"credit_limit" : 7500,
"REP_ID" : 65
},
{
"customer_id" : 408,
"customer_name" : "The Everything Shop",
"street" : "1828 Raven",
"city" : "Crystal",
"state" : "FL",
"ZIP" : 33503,
"balance" : 5285,
"credit_limit" : 5000,
"REP_ID" : 35
},
{
"customer_id" : 462,
"customer_name" : "Bargains Galore",
"street" : "3829 Central",
"city" : "Grove",
"state" : "FL",
"ZIP" : 33321,
"balance" : 3412,
"credit_limit" : 10000,
"REP_ID" : 65
},
{
"customer_id" : 148,
"customer_name" : "Kline's",
"street" : "838 Ridgeland",
"city" : "Fillmore",
"state" : "FL",
"ZIP" : 33336,
"balance" : 12762,
"credit_limit" : 15000,
"REP_ID" : 20
},
{
"customer_id" : 608,
"customer_name" : "Johnson's Department Store",
"street" : "372 Oxford",
"city" : "Sheldon",
"state" : "FL",
"ZIP" : 33553,
"balance" : 2106,
"credit_limit" : 10000,
"REP_ID" : 65
},
{
"customer_id" : 687,
"customer_name" : "Lee's Sport and Appliance",
"street" : "282 Evergreen",
"city" : "Altonville",
"state" : "FL",
"ZIP" : 32543,
"balance" : 2851,
"credit_limit" : 5000,
"REP_ID" : 35
},
{
"customer_id" : 725,
"customer_name" : "Deerfield's Four Seasons",
"street" : "282 Columbia",
"city" : "Sheldon",
"state" : "FL",
"ZIP" : 33553,
"balance" : 248,
"credit_limit" : 7500,
"REP_ID" : 35
},
{
"customer_id" : 842,
"customer_name" : "All Season",
"street" : "28 Lakeview",
"city" : "Grove",
"state" : "FL",
"ZIP" : 33321,
"balance" : 8221,
"credit_limit" : 7500,
"REP_ID" : 20
},
]
};
</script>
<script>
$(document).ready(function() {
$("container1").html(
"customer_id: " + jsonData.rows[0].customer_id + "<br/>" +
"customer_name: " + jsonData.rows[0].customer_name + "<br/>" +
"street: " + jsonData.rows[0].street + "<br/>" +
"city : " + jsonData.rows[0].city + "<br/>" +
"state: " + jsonData.rows[0].state + "<br/>" +
"ZIP: " + jsonData.rows[0].ZIP + "<br/>" +
"balance: " + jsonData.rows[0].balance + "<br/>" +
"credit length: " + jsonData.rows[0].credit_limit + "<br/>" +
"REP_ID: " + jsonData.rows[0].REP_ID + "<br/>" +
"<br/>"
);
});
</script>
</head>
<body>
<div id="container1" class="narrow"> </div>
</body>
</html>