/    Sign up×
Community /Pin to ProfileBookmark

Times Table Drill Help

Hi, I have a small query. What I have done so far is below.

<html>
<head>
<title>Times table Drill 2</title>
</head>
<body>
<script language=”JavaScript”>
<!– hide code
var e
e = (Math.random() * 11 ) + 1;
document.write(parseInt(e));
document.write(“<br>”);

var f
f = (Math.random() * 11 ) + 1;
document.write(parseInt(f));

var g
g = prompt(“Please mutliply the two numbers”, “Answer”);

if ( e * f)
{
alert(“Congratulations, your answer is correct”);
}

–>
</script>
</body>
</html>

What needs to be done. I’ve got this far. Next needs the form needs to display 2 new integers(numbers).

Any help would be appreciated.

Thanks

?

to post a comment
JavaScript

7 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Mar 08.2003 — Your question seems vague,please describe it,

Cheers

Khalid
Copy linkTweet thisAlerts:
@khalidali63Mar 08.2003 — ok..if thats what you want,then here is a"Better" guess a number game

?

http://68.145.35.86/skills/javascripts/GuessANumberGame.html

Cheers

Khalid
Copy linkTweet thisAlerts:
@khalidali63Mar 08.2003 — lol..I know I just said it was a better "Guess a Number Game"

:p

Khalid
Copy linkTweet thisAlerts:
@khalidali63Mar 08.2003 — He Dave,are you swamped with emails and stuff since you are a devoted moderator as well now?...is it overwheming you?

Khalid
Copy linkTweet thisAlerts:
@gibgerauthorMar 09.2003 — ok, I should have put it a bit simpler. here is what I need.

"I need to create a form that displays 2 randomly generated integers between 2 and 10 and a promt for the user's answer. it then produces a pop-up message saying whether the answer was the correct mutliplication of the ingeters. The forn then displays 2 new ingeters."

If you check mine out you will see that I have the 2 numbers randomly appearing and a prompt for an answer. I also have an alert saying that the answer is right. What I need is more script for when the answer is wrong and after that 2 new generated integers.

I hope that explains it a bit more.

?
Copy linkTweet thisAlerts:
@gibgerauthorMar 09.2003 — Dave what you put here was great and I do plead guilty. it is for an assigment. It's just that last part that is driving me batty. This is the first time I have ever even touch JS.
Copy linkTweet thisAlerts:
@gibgerauthorMar 11.2003 — thanks Dave.
×

Success!

Help @gibger spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...