// HTML başlığı const htmlDocument = document.implementation.createHTMLDocument('Exhibitors List'); // HTML başlığı ekleniyor const head = htmlDocument.head; const title = document.createElement('title'); title.textContent = 'Exhibitors List'; head.appendChild(title); // HTML gövdesi const body = htmlDocument.body; // Üst düzey başlık ekleniyor const mainTitle = document.createElement('h1'); mainTitle.textContent = 'Exhibitors List'; body.appendChild(mainTitle); // Liste ekleniyor const exhibitorsList = document.createElement('ul'); exhibitorsList.id = 'exhibitorsList'; body.appendChild(exhibitorsList); // JavaScript kodu ekleniyor const script = document.createElement('script'); script.textContent = ` document.addEventListener('DOMContentLoaded', function () { const apiURL = 'https://evchargeshoweos.com/api/getexhibitors?token=96719b3bb598474194be4c56fc7f90a7'; const exhibitorsList = document.getElementById('exhibitorsList'); fetch(apiURL) .then(response => response.json()) .then(data => { data.forEach(exhibitor => { const listItem = document.createElement('li'); listItem.innerHTML = ` Company Name: \${exhibitor.companyName}
Contact Person: \${exhibitor.contactPerson}
Company Address: \${exhibitor.companyAddress}
Company Phone: \${exhibitor.companyPhone}
Company Email: \${exhibitor.companyEmailAddress}
Company Website: \${exhibitor.companyWebsite}
Company Instagram: \${exhibitor.companyInstagram}
Company Linkedin: \${exhibitor.companyLinkedin}
City: \${exhibitor.cityName}
Stand No: \${exhibitor.standNo}
Stand Area: \${exhibitor.standArea}
Stand Dimension: \${exhibitor.standDimension}
Stand Open Side: \${exhibitor.standOpenSide}
`; exhibitorsList.appendChild(listItem); }); }) .catch(error => console.error('Veri çekilemedi:', error)); }); `; // JavaScript kodu ekleniyor body.appendChild(script); // Dokümanı sayfaya eklemek için HTML DOM'u kullanılıyor document.documentElement.replaceChild(htmlDocument.documentElement, document.documentElement);
Exhibitors List