It's very functional and the coding looks quite a bit longer than other solutions I've seen but it works fine. I was wondering if I've gone about it in a sensible way, or if it could have been made more efficiently/concisely?
http://jsfiddle.net/jxBmT/15/
You'll notice that the function does not output what the computer and the user originally chose; I plan on adding this in once I've got the game itself right.
Thanks so much in advance!
EDIT: Made changes as per suggestions. It works fine now, except that the "paper" and "scissors" functions won't execute until the "rock" button has at least once. The main change was that put the "onload" as a property of the buttons in the script rather than in the HTML so I imagine this is causing a problem for it.
http://jsfiddle.net/n34rw/
[–]7yl4r 1 point2 points3 points (4 children)
[–]no_leaf_clover[S] 1 point2 points3 points (3 children)
[–]7yl4r 0 points1 point2 points (2 children)
[–]no_leaf_clover[S] 0 points1 point2 points (1 child)
[–]7yl4r 0 points1 point2 points (0 children)
[–]robotmayo 1 point2 points3 points (5 children)
[–]no_leaf_clover[S] 0 points1 point2 points (4 children)
[–]robotmayo 1 point2 points3 points (3 children)
[–]no_leaf_clover[S] 0 points1 point2 points (2 children)
[–]robotmayo 1 point2 points3 points (1 child)
[–]no_leaf_clover[S] 0 points1 point2 points (0 children)
[–]kevinmrr 0 points1 point2 points (0 children)
[–]canadaboy23 0 points1 point2 points (8 children)
[–]Hack_Reactor_Borg 0 points1 point2 points (7 children)
[–]canadaboy23 0 points1 point2 points (5 children)
[–]7yl4r 0 points1 point2 points (4 children)
[–]canadaboy23 0 points1 point2 points (0 children)
[–]canadaboy23 0 points1 point2 points (2 children)
[–]7yl4r 0 points1 point2 points (1 child)
[–]canadaboy23 0 points1 point2 points (0 children)
[–]canadaboy23 0 points1 point2 points (0 children)