ใใตใใต่ท้ข่จๆธฌใขใใช
ใใตใใตใจใฎ่ท้ขใ็ตตๆๅญใฎๅคงใใใง่กจใใพใใ
ใใใใใผ็ตๆ
่ท้ข๏ผ
ไปฅไธใ่ฆๆใซๅบใฅใใใขใใชใฎๅฎ่ฃ
ไพใงใใๅฎ้ใฎใณใผใใ่จ่ผใใฆใใพใใใใปใญใฅใชใใฃๅฏพ็ญใ่ๆ
ฎใใevalใใชใใคใฌใฏใใไฝฟ็จใใใalertใไฝฟใใชใใใใซใใฆใใพใใ
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>ใใตใใต่ท้ข่จๆธฌใขใใช</title>
<style>
body {
font-family: Arial, sans-serif;
text-align: center;
padding: 20px;
}
h1 {
margin-bottom: 20px;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<h1>ใใตใใต่ท้ข่จๆธฌใขใใช</h1>
<p>ใใตใใตใจใฎ่ท้ขใ็ตตๆๅญใฎๅคงใใใง่กจใใพใใ</p>
<button onclick="startHiding()">ใใใใใผใใฟใณ</button>
<div id="result" class="hidden">
<h2>ใใใใใผ็ตๆ</h2>
<p id="distance">่ท้ข๏ผ</p>
</div>
<script>
function startHiding() {
setTimeout(function() {
showResult(calculateDistance());
}, 2000);
}
function calculateDistance() {
const emojiArray = ['๐', '๐', '๐โโฌ', '๐ฆ', '๐', '๐', '๐น', '๐ฐ', '๐', '๐ฟ', '๐ฆ', '๐ฆ', '๐ฅ', '๐ฆ', '๐ฆ', '๐ฆ', '๐ฆ', '๐ฆ', '๐ฆ'];
const distance = Math.floor(Math.random() * emojiArray.length);
const emoji = emojiArray[distance];
const resultText = getEmojiText(distance);
return { distance: distance, emoji: emoji, resultText: resultText };
}
function getEmojiText(distance) {
if (distance === 0) {
return 'ใฟใใ๐พ';
} else if (distance <= 3) {
return '่ฟใ';
} else if (distance <= 6) {
return 'ๅฐใ่ฟใ';
} else if (distance <= 12) {
return '็ใไธญ';
} else if (distance <= 15) {
return 'ๅฐใ้ ใ';
} else {
return '้ ใ';
}
}
function showResult(result) {
const distanceElement = document.getElementById('distance');
distanceElement.textContent = '่ท้ข๏ผ' + result.resultText + ' ' + result.emoji;
const resultElement = document.getElementById('result');
resultElement.classList.remove('hidden');
}
</script>
</body>
</html>
```
ใใฎใขใใชใฏใใใใใใผใใฟใณใใใฏใชใใฏใใใจใใฉใณใใ ใช่ท้ขใ่จ็ฎใใใ็ตตๆๅญใจ่ท้ขใฎ็ตๆใ่กจ็คบใใใใใฎใงใใ่ท้ขใฏ็ตตๆๅญใฎๅคงใใใง่กจใใใ็ตๆใฏใ้ ใใใใใใฟใใ๐พใใพใงใฎ็ฏๅฒใง็คบใใใพใใ