c = a * b
d = c/4
.....怎么回答呢

解决方案 »

  1.   

    <html><head><title>New Page 1</title>
    <script>
    var count=0
    function produce_num()  //产生随机数
    {
      form1.t1.value=parseInt(10*Math.random());
      form1.t3.value=parseInt(10*Math.random());
    }
    function submit_question() //判断结果正确性
    {
       
      
       
       if(parseInt(form1.t4.value)==parseInt(form1.t1.value)+parseInt(form1.t3.value))
       {
          alert("你的答案正确")
          count=count+1;
          produce_num()
       
       }
       else
       {alert("你的答案不正确")
        produce_num();
       }
       form1.t5.value=count
      }</script></head><body onload="produce_num()"><form name="form1" method="POST" action="">
     
      <p>问题<input type="text" name="t1" size="6">+           
      <input type="text" name="t3" size="7">
      =<input type="text" name="t4" size="21" value="请在这里输入答案"></p>          
      <p>当前的分数 :<input type="text" name="t5" size="20"></p>            
      <p><input type="button" value="提交" name="B1" onClick="submit_question()"></p>
    </form></body></html>
      

  2.   

    <html><head><title>New Page 1</title>
    <script>
    var count=0
    function produce_num()  //产生随机数
    {
      form1.t1.value=parseInt(100*Math.random());
      form1.t3.value=parseInt(100*Math.random());
    }
    function submit_question() //判断结果正确性
    {
       
       if(parseInt(form1.t4.value)==parseInt(form1.t1.value)+parseInt(form1.t3.value))
       {
          alert("你的答案正确")
          count=count+1;
          form1.t4.value=""
          produce_num();
          
       
       }
       else
       {alert("你的答案不正确")
        produce_num();
        form1.t4.value=""
       }
       form1.t5.value=count
      }</script></head><body onload="produce_num()"><form name="form1" method="POST" action="">
     
      <p>问题<input type="text" name="t1" size="6">+<input type="text" name="t3" size="7">
      =<input type="text" name="t4" size="21" value="请在这里输入答案" onfocus="this.value=''"></p>           
      <p>当前的分数 :<input type="text" name="t5" size="20"></p>            
      <p><input type="button" value="提交" name="B1" onClick="submit_question()"></p>
    </form></body></html>