スピッツの歌詞 vs コミックLOの表紙ポエム
どっちの文章か当ててみよう!
<!DOCTYPE html>
<html>
<head>
<title>スピッツの歌詞 vs コミックLOの表紙ポエム</title>
</head>
<body>
<h1>スピッツの歌詞 vs コミックLOの表紙ポエム</h1>
<p>どっちの文章か当ててみよう!</p>
<div id="text"></div>
<button onclick="checkAnswer(true)">スピッツの歌詞</button>
<button onclick="checkAnswer(false)">コミックLOの表紙ポエム</button>
<script>
const quiz = [
{
text: "ビルの谷間に 寝そべるように佇む",
isSongLyric: true
},
{
text: "美少女の涙は世界を救う",
isSongLyric: false
},
{
text: "のびしろ知らず 雲の上に住む",
isSongLyric: true
},
{
text: "寒色のパンフレットで ぎゅうぎゅう詰めにします",
isSongLyric: false
},
{
text: "冬の空気が 涙を凍らせてた",
isSongLyric: true
},
{
text: "もしも僕がまた 君を好きになっても",
isSongLyric: true
},
{
text: "僕たちは想い続けたいんだ その扉を開くまで",
isSongLyric: true
},
{
text: "海外出張も思い通り! メシだって食えるさ",
isSongLyric: false
},
{
text: "折り紙ハット被って 帰ってくるー",
isSongLyric: true
},
{
text: "なんだこれいいかんじ!母の味を鯵にトッピング",
isSongLyric: false
},
{
text: "爆笑の中 めぐり逢う",
isSongLyric: true
},
{
text: "一面の銀世界が私たちを出迎える",
isSongLyric: false
}
];
let currentQuiz = null;
function showQuiz() {
const index = Math.floor(Math.random() * quiz.length);
currentQuiz = quiz[index];
document.getElementById("text").innerText = currentQuiz.text;
}
function checkAnswer(answer) {
if (currentQuiz.isSongLyric === answer) {
alert("正解!");
} else {
alert("不正解...");
}
showQuiz();
}
showQuiz();
</script>
</body>
</html>