Giới thiệu sản phẩm
document.getElementById('checkZodiac').addEventListener('click', function() {
const resultDiv = document.getElementById('result');
resultDiv.style.display= 'block'; //hien thi khung ket qua
resultDiv.innerHTML = '<div class= "waiting">Dang cho lay thong tin..</div> ';
const birthdate = new Date (document.getElementById('birthdate').value);
const month = birthdate.getMoth() +1 ; //thang(0-11)
const day =birthdate.getDate();
const name = document.getElementById('name').value.trim();
const zodiac = getZodiacSign(month, day);
const details = getZodiacDetails(zodiac,name);
//hien thi ket qua khi co tt
resultDiv.innerHTML = 'Chao ban <span class="name">${name}</span>\n\n' +details ;
document.getElementById('share').style.display = 'block' ; //hien thi nut chia se
const resultDiv = document.getElementById('result');
resultDiv.style.display= 'block'; //hien thi khung ket qua
resultDiv.innerHTML = '<div class= "waiting">Dang cho lay thong tin..</div> ';
const birthdate = new Date (document.getElementById('birthdate').value);
const month = birthdate.getMoth() +1 ; //thang(0-11)
const day =birthdate.getDate();
const name = document.getElementById('name').value.trim();
const zodiac = getZodiacSign(month, day);
const details = getZodiacDetails(zodiac,name);
//hien thi ket qua khi co tt
resultDiv.innerHTML = 'Chao ban <span class="name">${name}</span>\n\n' +details ;
document.getElementById('share').style.display = 'block' ; //hien thi nut chia se
Hình ảnh sản phẩm
![](https://s3-sgn10.fptcloud.com/teky-prod/teky-edu-vn/media/project_medias/2024/12/22/uCTwPIzb6G6SAviS_2024122212041.png)
Sản phẩm cùng tác giả
Sản phẩm liên quan
Không có sản phẩm nào
Đăng nhập để tham gia bình luận