じゃんけんしてみよう
じゃんけんするプログラムの要件
いけたらやりたいこと
シンプルな回答例
HTML
<!doctype html>
<html>
<head>
<title>じゃんけんアプリ</title>
<script src="./script.js"></script>
</head>
<body>
<input type="button" value="グー" onclick="rsp(0);">
<input type="button" value="チョキ" onclick="rsp(1);">
<input type="button" value="パー" onclick="rsp(2);">
<div>
<div id="player"></div>
<div id="computer"></div>
<div id="resultMsg"></div>
</div>
</body>
</html>JavaScript (script.js)
Last updated