Ich versuche die Bootstrap-Tabelle zu verwenden, um Json-Daten zu laden. Wie kann ich eine externe JSON-Datei in die Bootstrap-Tabelle unten laden.So zeigen Sie JSON-Daten in der Bootstrap-Tabelle an
HTML
<table data-toggle="table"
data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"
data-click-to-select="true">
<thead>
<tr>
<th data-field="state" data-checkbox="true"></th>
<th data-field="name">Name</th>
<th data-field="stargazers_count">Stars</th>
<th data-field="forks_count">Forks</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
JSON
{
"Name": "Jeame whos",
"LoanApproved": "12/5/2015",
"LastActivity": "4/1/2016",
"Aging": "3",
"Brokerage": "My Broker",
"Contact": "J. Johnson",
"ContactPhone": "(212) 902-3614",
"RiskCategory": "Yellow",
"rows": [{
"Account": "086-1234",
"ClientName": "Sally Sung",
"AccountType": "$01",
"MarketValue": "450000"
}, {
"Account": "086-1235",
"ClientName": "Sally Sung",
"AccountType": "rust",
"MarketValue": "550000"
},
{
"Account": "086-1236",
"ClientName": "Sally Sung",
"AccountType": "Retail",
"MarketValue": "550000"
}]
}
Ich hoffe, dass jene Details nicht wirklich persönlich sind. Wenn dies der Fall ist, sollten Sie diese Frage vollständig löschen und erneut fragen. – Andrew