https://musiclab.chromeexperiments.com/Song-Maker/song/5156572661153792
https://23844845953.buzzfeedo.com/result/say_hi_to_gugugaga_penguin__1777278556585.html?carouselIndex=0&nocache=1
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>끝말잇기 대결</title> <style> body{ font-family: sans-serif; background:#f5f5f5; text-align:center; } .container{ max-width:500px; margin:auto; background:white; padding:20px; border-radius:10px; margin-top:30px; } input{ width:70%; padding:10px; } button{ padding:10px 20px; } #words{ text-align:left; margin-top:20px; } </style> </head> <body> <div class="container"> <h1>끝말잇기 대결</h1> <p id="turn">플레이어 1 차례</p> <input id="word" placeholder="단어 입력"> <button onclick="play()">입력</button> <h3 id="last">첫 단어를 입력하세요.</h3> <div id="words"></div> </div> <script> let lastWord=""; let player=1; let history=[]; function play(){ const input=document.getElementById("word"); const word=input.value.trim(); if(word=="") return; if(lastWord!=""){ let last=lastWord[lastWord.length-1]; let first=word[0]; if(last!==first){ alert("틀렸습니다! 플레이어 "+(player==1?2:1)+" 승!"); location.reload(); return; } } history.push("플레이어 "+player+" : "+word); lastWord=word; document.getElementById("last").innerHTML= "현재 단어 : <b>"+lastWord+"</b>"; document.getElementById("words").innerHTML= history.join("<br>"); player=player==1?2:1; document.getElementById("turn").innerHTML= "플레이어 "+player+" 차례"; input.value=""; input.focus(); } </script> </body> </html>
게임 스크립트임?
https://youtu.be/r5cfEWlt8Lw?si=SdLvKOJ3bZxy8
아무거나
아니요
아닌디요
이것은 볼 필요가 없는 아무 댓글입니다
💬 댓글 9
https://musiclab.chromeexperiments.com/Song-Maker/song/5156572661153792
https://23844845953.buzzfeedo.com/result/say_hi_to_gugugaga_penguin__1777278556585.html?carouselIndex=0&nocache=1
<!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <title>끝말잇기 대결</title> <style> body{ font-family: sans-serif; background:#f5f5f5; text-align:center; } .container{ max-width:500px; margin:auto; background:white; padding:20px; border-radius:10px; margin-top:30px; } input{ width:70%; padding:10px; } button{ padding:10px 20px; } #words{ text-align:left; margin-top:20px; } </style> </head> <body> <div class="container"> <h1>끝말잇기 대결</h1> <p id="turn">플레이어 1 차례</p> <input id="word" placeholder="단어 입력"> <button onclick="play()">입력</button> <h3 id="last">첫 단어를 입력하세요.</h3> <div id="words"></div> </div> <script> let lastWord=""; let player=1; let history=[]; function play(){ const input=document.getElementById("word"); const word=input.value.trim(); if(word=="") return; if(lastWord!=""){ let last=lastWord[lastWord.length-1]; let first=word[0]; if(last!==first){ alert("틀렸습니다! 플레이어 "+(player==1?2:1)+" 승!"); location.reload(); return; } } history.push("플레이어 "+player+" : "+word); lastWord=word; document.getElementById("last").innerHTML= "현재 단어 : <b>"+lastWord+"</b>"; document.getElementById("words").innerHTML= history.join("<br>"); player=player==1?2:1; document.getElementById("turn").innerHTML= "플레이어 "+player+" 차례"; input.value=""; input.focus(); } </script> </body> </html>
게임 스크립트임?
https://youtu.be/r5cfEWlt8Lw?si=SdLvKOJ3bZxy8
아무거나
아니요
아닌디요
이것은 볼 필요가 없는 아무 댓글입니다