0
打印對象的數據,我有以下對象的數據:如何在JavaScript
var response = {
"response": {
"numFound": 7945,
"docs": [{
"description": "target",
"url": "target",
"id": "269653",
"score": 6.9186745
},
{
"description": "Target Kent",
"url": "Target_Kent",
"id": "37275",
"score": 4.3241715
}]
},
"highlighting": {
"269653": {
"description": ["<em>target</em>"]
},
"37275": {
"description": ["<em>Target</em> Kent"]
}
}
};
我可以用response.response.docs[0].description
打印出來"target"
。但我不知道如何打印出"<em>target</em>"
。謝謝。
請澄清你的問題。你說你可以打印「目標」,但你不知道如何打印「目標」? – Kyle 2010-12-23 04:36:47