Update Tester.HTML
This commit is contained in:
parent
ac7dabac06
commit
85df6dcfe1
1 changed files with 5 additions and 1 deletions
|
@ -41,7 +41,11 @@
|
||||||
let resultList = document.createElement('ul');
|
let resultList = document.createElement('ul');
|
||||||
results.forEach(result => {
|
results.forEach(result => {
|
||||||
let listItem = document.createElement('li');
|
let listItem = document.createElement('li');
|
||||||
listItem.textContent = `Title: ${result.title}, Year: ${result.year}`;
|
let link = document.createElement('a');
|
||||||
|
link.textContent = `${result.title} (${result.year})`;
|
||||||
|
link.href = result.link; // Assuming there's a 'link' property in the dictionary
|
||||||
|
link.target = '_blank'; // Open link in a new tab
|
||||||
|
listItem.appendChild(link);
|
||||||
resultList.appendChild(listItem);
|
resultList.appendChild(listItem);
|
||||||
});
|
});
|
||||||
searchResultsDiv.appendChild(resultList);
|
searchResultsDiv.appendChild(resultList);
|
||||||
|
|
Loading…
Add table
Reference in a new issue