admin管理员组文章数量:1130349
I am very new to JavaScript and HTML. I am trying to get a 2 player rock, paper, scissors game where the first player chooses an option and then afterwards the second player will choose an option. I am having troubles linking the player1 and player2 together to enable me to use if and else statements effectively. I am not sure if I am using functions correctly either.
This is what I've done so far...
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width", intial-scale="1.0"/>
<title> Two Player Rock, Paper, Scissors</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<h1>2 Player Rock, Paper, Scissors</h1>
<div id="playerChoose">Player 1 Please Choose: </div>
<div class="player1Choices">
<button id="rock" onclick="playGame('Rock')">I am very new to JavaScript and HTML. I am trying to get a 2 player rock, paper, scissors game where the first player chooses an option and then afterwards the second player will choose an option. I am having troubles linking the player1 and player2 together to enable me to use if and else statements effectively. I am not sure if I am using functions correctly either.
This is what I've done so far...
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width", intial-scale="1.0"/>
<title> Two Player Rock, Paper, Scissors</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<h1>2 Player Rock, Paper, Scissors</h1>
<div id="playerChoose">Player 1 Please Choose: </div>
<div class="player1Choices">
<button id="rock" onclick="playGame('Rock')">
本文标签:
javascript2 player rockpaperscissors gameStack Overflow
版权声明:本文标题:javascript - 2 player rock, paper, scissors game - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人,
转载请联系作者并注明出处:https://it.en369.cn/questions/1736013670a1378768.html,
本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论