11/03 - The Chicago Cubs have Won the World Series!!! Thursday

Status
Not open for further replies.

<Gucci>

Francis Manancis ...fuck you...
Threaderator
Crowd Pleaser
HIT Poster
Joined
Feb 6, 2016
Messages
13,614
Reaction score
29,767
Points
1,739
Age
39
Location
Detroit
Gender
Female
Late night bribes, anyone? I *might* be convinced to ignore the computer's vote and change my button.

Convince me.
How do I bribe you?....
 
  • Like
Reactions: The Bad Ash

Kadauchi

Well-Known Member
Master Pleaser
Crowd Pleaser
Joined
Jan 12, 2016
Messages
7,098
Reaction score
21,951
Points
1,263
these are words.

okay good.

Now lets see here...

Yeah, lets case 52: case 100://4, Numpad 4.

got it
Well, its a switch case. In this, the switch is the keycode of the key pressed. So if you press the 4 key (keycode 52) or the numpad 4 key (keycode 100), it triggers the code beneath it until the break; which is "answer(3)". answer(3) calls the answer function with the value of 3, which tells the function to click the radio button at the 3th index, which is the 4th radio (because javascript is 0 indexed, so the first element is 0, 2nd element is 1 and so on).
 
Status
Not open for further replies.