<body> <h2>プレイヤーが選択</h2> <script type="text/javascript"> Init(); Check(); Play(); </script> |
// プレイ関数
function Play()
{
if (param["mode"]==0) //手を選択
{
document.write('<form action="jyanken2.html" method="get">');
document.write('<input type="hidden" name="mode" value=1>');
document.write('<input type="hidden" name="score_m" value=',param["score_m"],'>');
document.write('<input type="hidden" name="score_c" value=',param["score_c"],'>');
document.write('<input type="hidden" name="cnt" value=',param["cnt"],'>');
document.write('<input type="hidden" name="com" value=0>');
document.write('<input type=radio name="man" value=0 CHECKED>グー<br>');
document.write('<input type=radio name="man" value=1>チョキ<br>');
document.write('<input type=radio name="man" value=2>パー<br>');
document.write('<input type="submit" value="送信">');
document.write('</form>');
return;
}
|
if (param["mode"]==1) //画像の表示
{
var man = param["man"];
if (man==0) document.write('<img src="jgu.gif"><br>');
if (man==1) document.write('<img src="jchi.gif"><br>');
if (man==2) document.write('<img src="jpa.gif"><br>');
document.write('<form action="jyanken2.html" method="get">');
document.write('<input type="hidden" name="mode" value=0>');
document.write('<input type="hidden" name="score_m" value=',param["score_m"],'>');
document.write('<input type="hidden" name="score_c" value=',param["score_c"],'>');
document.write('<input type="hidden" name="cnt" value=',(param["cnt"]+1),'>');
document.write('<input type="submit" value="確認">');
document.write('</form>');
}
}
</script>
|
![]()