かんたん作成.com【HTML,CSS,JavaScript,CGI,PHP】

Click Here! BIGLOBE
BIGLOBEに入会すると料金がお得!!月額料金987円からのADSL好評受付中
1800カウンター
無料カウンター アクセス解析つき 日本最大級のカウンター数なんと1800種類以上!お気に入りのカウンターが必ずみつかるはず!設置が簡単。デザイン、桁数が選べる。二重カウント防止。表示が速い。アクセス解析できちゃう。昨日、今日のカウンターの表示可能。もちろん無料!!
トラフィックゲート
ホームページ広告を載せて、おこづかいをゲットしよう!今なら、あなたの頑張りが形になる。ホームページをお持ちの方は必見!モバイル3キャリアにも完全対応!

九九の勉強


<html>
<head>
<title>九九の勉強</title>
   <script language="JavaScript">
   <!--
   function start() {
      rand1 = Math.floor(Math.random() * 9) + 1;   //問題作成
      rand2 = Math.floor(Math.random() * 9) + 1;
      msg = rand1 + " × " + rand2;
      document.form1.text1.value = msg;      //問題表示
      document.form1.text2.value = "";      //回答入力欄をクリア
      document.form1.text2.focus();         //カーソルを入力欄に移動
   }
   function check() {
      if(document.form1.text2.value == (rand1 * rand2)) {
         msg = "○ 正解";         //正解のメッセージ
      }
      else {                  //不正解のメッセージ
         msg = "× 不正解(答え:" + rand1 * rand2 + ")";
      }
      alert(msg);               //メッセージ表示
      start();               //問題作成へ
      return false;               //フォーム送信キャンセル
   }
   //-->
   </script>
   <style>
   <!--
   body, input   {
      font-size:   20px;
      text-align:   center;
   }
   //-->
   </style>
</head>
<body onLoad="start()">
<form action="" method="" name="form1" onSubmit="return check()">
<input type="text" name="text1" size="10"> = <input type="text" name="text2" size="3"> 
<input type="submit" value="OK">
</form>
</body>
</html>
実行する
当サイトはリンクフリーです。
	<a href="http://www.kantansakusei.com/">かんたん作成.com【HTML,CSS,JavaScript,CGI,PHP】</a>