我正在尝试在容器中将图像与搜索结果一起显示,该容器很好地显示了相关的搜索结果,但我认为用于显示该图像的基于JavaScript的搜索引擎代码有问题,请帮忙。
var tipuesearch = {
"pages": [
{
"title": "Flash",
"image": "C:Users/user/Documents/pages/Images/Flash.jpg",
"text": "The Flash is a trilling science fiction movie, based on Barry Allen",
"url": "C:/Users/user/documents/resizable/Flash.html"
},
]
};
要访问您的图像和URL,您需要:
var tipuesearch = {
pages: [
{
title: 'Flash',
image: 'http://localhost:8080/pages/Images/Flash.jpg',
text:
'The Flash is a trilling science fiction movie, based on Barry Allen',
url: 'http://localhost:8080/resizable/Flash.html'
}
]
};