# Réponse finale obtenue du bot:
response = « Voici un exemple de code JavaScript pour une page web qui permet aux ambulanciers et ambulancières de rechercher des alliances stratégiques :
« `
// HTML structure
Alliance Stratégique
// JavaScript code
const apiUrl = ‘https://api.example.com/alliances’; // Replace with your API URL
function searchAlliances() {
const searchInput = document.getElementById(‘search’);
const searchTerm = searchInput.value.toLowerCase();
fetch(`${apiUrl}?q=${searchTerm}`)
.then(response => response.json())
.then(data => displayAlliances(data))
.catch(error => console.error(‘Error fetching alliances:’, error));
}
function displayAlliances(alliances) {
const resultsDiv = document.getElementById(‘results’);
resultsDiv.innerHTML = »;
alliances.forEach(alliance => {
const resultElement = document.createElement(‘div’);
resultElement.textContent = alliance.name; // Replace with the relevant data for each alliance
resultsDiv.appendChild(resultElement);
});
}
« `
Note that this is just an example, and you will need to modify it to fit your specific needs. You will also need to replace `apiUrl` with the URL of your API for fetching alliances, and update the `displayAlliances` function to display the relevant data from each alliance. »