Attachment
Hat, sun festival, socks, cutlery, notebook, pendant, key chain, etc
Remove all
$60.00
// WhatsApp联系方式列表 const whatsappNumbers = [ '8618120580197', '8615071005464', ]; // 创建悬浮按钮 function createWhatsAppButton() { // 创建按钮元素 const button = document.createElement('div'); button.innerHTML = `
`; // 添加点击事件 button.querySelector('.whatsapp-button').addEventListener('click', () => { // 随机选择一个WhatsApp号码 const randomNumber = whatsappNumbers[Math.floor(Math.random() * whatsappNumbers.length)]; // 构建WhatsApp链接 const whatsappUrl = `https://wa.me/${randomNumber}`; // 在新窗口打开WhatsApp window.open(whatsappUrl, '_blank'); }); // 将按钮添加到页面 document.body.appendChild(button); } // 当页面加载完成后创建按钮 document.addEventListener('DOMContentLoaded', createWhatsAppButton);