Old 04-22-2014, 10:06 PM   #1 (permalink)
Status: Senior Member
Posts: 711

Default calling all html and js programmers

Alright, I have a little experience in programming in VB, Java, and C#, but I am a beginner to the HTML world. I have been designing a HTML document in which a random number is generated and the user has to guess the number. The document doesn't quite work, and I was hoping to find some help here. I will paste the code below. You will have to go to you dev console to see and work on the code, sorry there was no other way I could put it on the website. Thank You!!!


<p> Guess The Number 1-10 </p>
<p id="Check">Test</p>
<input id="in" type="textbox">
<input type="button" onclick="Guess()" value="Go">

n = Math.floor((Math.random()*10)+1)
g = getElementById("in");
c = getElementById("Check");
function Guess() {
if (g.value = n)
c.innerHTML = "Correct!"
g.value = ""
c = "Incorrect!"
g.innerHTML = ""
TheGreat33 is offline   Reply With Quote



Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Computer Programmers.? Rhod Computer Programmer 2 05-19-2014 10:06 PM
Calling all Java programmers. Need help on Alpha stages of Artificial intelligent program.? Artifact Coding 0 01-22-2014 07:06 PM
Calling advanced PHP Programmers - Please help with question.? Unknown_User PHP Code/ PHP Codes 1 08-09-2012 10:37 AM
Calling all professional Java programmers!? Unknown_User Computer Programmer 0 04-20-2012 10:36 AM
calling all c# programmers? LeanneC Programmer/ Programmers 2 02-02-2012 07:09 AM