获取以下值的最容易理解的解决方案是什么:
Bill, Smith, 32
Sarah, Lord, 28
我只做到了这一点:
HTML
<a href="#" onclick="displayEmployees();">displayEmployees</a>
Javascript
function displayEmployees() {
var employees = new Array();
employees['firstName'] = new Array('Bill','Sarah','Elizabeth','David','Robert');
employees['lastName'] = new Array('Smith','Lord','Crayford','Clark','Robinson');
employees['age'] = new Array('32','28','20','54','18');
for(x in employees) {
var value = employees[x]
document.write(value + "<br />");
}