function nextQuestion(number) {
const question = randomQuestions[number].question;
document.querySelector(".question").innerText = question;
//create inputs
const inputsLength = randomQuestions[number].answer.length;
for (let i = 1; i <= inputsLength; i++) {
let input = document.createElement("input");
document.querySelector(".answer").appendChild(input);
}
const answer = randomQuestions[number].answer;
const inputs = document.querySelectorAll("input");
const values = Array.from(inputs).map((input) => input.value);
const inputsJoin = values.join("");
//focus
inputs[0].focus();
inputs.forEach((e, index) => {
e.addEventListener("keydown", (event) => {
const previewsInput = e.previousSibling;
if(event.key === 'Backspace' && previewsInput){
previewsInput.focus();
return;
}
});
e.addEventListener("input", (event) => {
const nextInput = e.nextElementSibling;
// console.log(event);
if (nextInput && event.data !== null) {
nextInput.focus();
}
//correct answer
const values = Array.from(inputs).map((input) => input.value);
const inputsJoin = values.join("");
if (inputsJoin === answer) {
newQuestion();
}
});
});
//timer
let timer = 10;
document.querySelector(".timer").innerText = timer;
const interval = setInterval(() => {
timer--;
document.querySelector(".timer").innerText = timer;
if (timer < 0) {
newQuestion();
}
}, 1000);
function newQuestion() {
clearInterval(interval);
score = score + Number(document.querySelector(".timer").innerText);
console.log(score);
if (number === 9) {
//the end
document.querySelector("dialog").showModal();
document.querySelector(".score").innerText = score;
} else {
document.querySelector(".answer").innerHTML = "";
const nextNumber = number + 1;
nextQuestion(nextNumber);
}
}
}
לא הגיוני....לעלות תצלום מסך?
![]()
F12 - עריכת HTMLלא הגיוני....
אלא אם כן היה איזה קומבינה...
א"א לכתוב בפחות משניה כל מילה....
מה הטריק?
לא פעיל?(שימו לב, בניגוד למה שמקובל בתשבצים/תשחצים, במשחק הזה אותיות סופיות נכתבות כסופיות)![]()
עובדעבר לכאן
![]()
כאן,היי
תודה על ההעברה
אבל עדיין לא מופיע לי כלום
רואה מסך שחור
למה לא נפתח?כאן,
![]()
מוזר, אצלי עובדלמה לא נפתח?
מסך שחור ובצד כתוב יצירת תשחץ
rhon.co.il
מעכשיו, תהיו הראשונים לקבל את כל העדכונים, החדשות, ההפתעות בלעדיות, והתכנים הכי חמים שלנו בפרוג!
חלה שגיאה בשליחה. נסו שוב!
לוח לימודים
מסלולי לימוד שאפשר להצטרף
אליהם ממש עכשיו:
תהילים פרק כה
אלְדָוִד אֵלֶיךָ יי נַפְשִׁי אֶשָּׂא:באֱלֹהַי בְּךָ בָטַחְתִּי אַל אֵבוֹשָׁה אַל יַעַלְצוּ אֹיְבַי לִי:גגַּם כָּל קוֶֹיךָ לֹא יֵבֹשׁוּ יֵבֹשׁוּ הַבּוֹגְדִים רֵיקָם:דדְּרָכֶיךָ יי הוֹדִיעֵנִי אֹרְחוֹתֶיךָ לַמְּדֵנִי:ההַדְרִיכֵנִי בַאֲמִתֶּךָ וְלַמְּדֵנִי כִּי אַתָּה אֱלֹהֵי יִשְׁעִי אוֹתְךָ קִוִּיתִי כָּל הַיּוֹם:וזְכֹר רַחֲמֶיךָ יי וַחֲסָדֶיךָ כִּי מֵעוֹלָם הֵמָּה:זחַטֹּאות נְעוּרַי וּפְשָׁעַי אַל תִּזְכֹּר כְּחַסְדְּךָ זְכָר לִי אַתָּה לְמַעַן טוּבְךָ יי:חטוֹב וְיָשָׁר יי עַל כֵּן יוֹרֶה חַטָּאִים בַּדָּרֶךְ:טיַדְרֵךְ עֲנָוִים בַּמִּשְׁפָּט וִילַמֵּד עֲנָוִים דַּרְכּוֹ:יכָּל אָרְחוֹת יי חֶסֶד וֶאֱמֶת לְנֹצְרֵי בְרִיתוֹ וְעֵדֹתָיו:יאלְמַעַן שִׁמְךָ יי וְסָלַחְתָּ לַעֲוֹנִי כִּי רַב הוּא:יבמִי זֶה הָאִישׁ יְרֵא יי יוֹרֶנּוּ בְּדֶרֶךְ יִבְחָר:יגנַפְשׁוֹ בְּטוֹב תָּלִין וְזַרְעוֹ יִירַשׁ אָרֶץ:ידסוֹד יי לִירֵאָיו וּבְרִיתוֹ לְהוֹדִיעָם:טועֵינַי תָּמִיד אֶל יי כִּי הוּא יוֹצִיא מֵרֶשֶׁת רַגְלָי:טזפְּנֵה אֵלַי וְחָנֵּנִי כִּי יָחִיד וְעָנִי אָנִי:יזצָרוֹת לְבָבִי הִרְחִיבוּ מִמְּצוּקוֹתַי הוֹצִיאֵנִי:יחרְאֵה עָנְיִי וַעֲמָלִי וְשָׂא לְכָל חַטֹּאותָי:יטרְאֵה אוֹיְבַי כִּי רָבּוּ וְשִׂנְאַת חָמָס שְׂנֵאוּנִי:כשָׁמְרָה נַפְשִׁי וְהַצִּילֵנִי אַל אֵבוֹשׁ כִּי חָסִיתִי בָךְ:כאתֹּם וָיֹשֶׁר יִצְּרוּנִי כִּי קִוִּיתִיךָ:כבפְּדֵה אֱלֹהִים אֶת יִשְׂרָאֵל מִכֹּל צָרוֹתָיו:
הנושאים החמים