autotunisiashield / script.js
Scarface-team's picture
Nom du site tarification automobile tunisienne coulzur sombre en dinars tunisien de tout les model de voiture possible
5233391 verified
document.addEventListener('DOMContentLoaded', function() {
// Simulate calculation
const calculateBtn = document.querySelector('button');
if(calculateBtn) {
calculateBtn.addEventListener('click', function() {
// Generate random price between 300 and 1200
// Convert to Tunisian Dinar (TND) with realistic range
const randomPrice = Math.floor(Math.random() * (4000 - 1000 + 1)) + 1000;
// Create result element
const resultDiv = document.createElement('div');
resultDiv.className = 'mt-6 p-4 bg-blue-50 rounded-lg border border-blue-200';
resultDiv.innerHTML = `
<h3 class="text-lg font-bold text-blue-800 mb-2">Estimation de votre tarif</h3>
<p class="text-gray-700 mb-2">Votre tarif estimé est de :</p>
<p class="text-3xl font-bold text-blue-600">${randomPrice}€/an</p>
<p class="text-sm text-gray-500 mt-2">Ce tarif est une estimation et peut varier selon votre profil.</p>
<button class="mt-4 bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-lg transition duration-200">
<i data-feather="phone" class="mr-2"></i> Contactez un conseiller
</button>
`;
// Insert after the form
const formSection = document.querySelector('section');
formSection.appendChild(resultDiv);
// Refresh icons
feather.replace();
});
}
});