Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help finishing my reading game for elementary students. I want it to be a

ID: 3922632 • Letter: I

Question

I need help finishing my reading game for elementary students. I want it to be a remembering game. The kids have a certain amounts of seconds until the words disappear and the only way to get it right is that they have to type in what that fruit or thing is in order to get it correct. Please help.

<html>
<head>
<script type="text/javascript">
<!-- method to perform action -->
click=0;
function func(link)
{
document.getElementById("app").src=link;
click++;
if(click>1)
<!-- clearing timer -->
clearTimeout(timer);
onTimer();

}
i=60;
<!-- setting timer -->
function onTimer() {
document.getElementById('time').innerHTML = i;
i--;
if (i < 0) {
alert("Time out Kid");
}
else {
timer= setTimeout(onTimer, 1000);
}
}
</script>
</head>
<body>
<center>
<!-- just a heading of game -->
<h1>Lets Play The Game </h1>
<div float="left">
<!-- table with words -->
<table border="3" hieght="200" width="300">
<tr><td><b>Apple</b></td><td><b>Cat</b></td></tr>
<tr><td><b>Bat</b></td><td><b>Rat</b></td></tr>
</table>
</div>
<div float="left">
<img id="app" src="sdsd.png" hieght="150" width="150">
</div>
<div id="time">
</div>
</center>
</body>

Explanation / Answer

Find the solution below:

==========================================================================

<html>
<head>
<script type="text/javascript">
<!-- method to perform action -->
click=0;
function func(link)
{
document.getElementById("app").src=link;
click++;
if(click>1)
<!-- clearing timer -->
clearTimeout(timer);
onTimer();

}
i=60;
<!-- setting timer -->
function onTimer() {
document.getElementById('time').innerHTML = i;
i--;
if (i < 0) {
alert("Time out Kid");
}
else {
timer= setTimeout(onTimer, 1000);
}
}
function checkMatch()
{
   var m=new String(document.getElementById('textMatch').value).toUpperCase();
   var str=new String(document.getElementById("app").src);
   if(i>0&&str.search("bat")>0 && m =="BAT"){
       alert("typed correctly");
   }
   if(i>0&&str.search("cat")>0 && m =="CAT"){
       alert("typed correctly");
   }
   if(i>0&&str.search("rat")>0 && m =="RAT"){
       alert("typed correctly");
   }
   if(i>0&&str.search("apple")>0 && m =="APPLE"){
       alert("typed correctly");
   }
   clearTimeout(timer);
}
</script>
</head>
<body>
<center>
<!-- just a heading of game -->
<h1>Lets Play The Game </h1>
<div float="left">
<!-- table with words -->
<table border="3" hieght="200" width="300">
<tr><td><b>Apple</b></td><td><b>Cat</b></td></tr>
<tr><td><b>Bat</b></td><td><b>Rat</b></td></tr>
</table>
</div>
<div float="left">
<img id="app" src="sdsd.png" hieght="150" width="150">
</div>
<div id="time">
</div>
<input type="text" id="textMatch"
</center>
</body>

============================================================================

please let me know if you need more implementation.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote