<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
    <link rel="stylesheet" href="https://v40.pingendo.com/assets/4.0.0/default/theme.css" type="text/css"> </head>
    <meta charset="utf-8">
    <title> แบบทดสอบ แม่ ก กา</title>

    <script>
    startday = new Date();
    clockStart = startday.getTime();
    function initStopwatch()
    {
    var myTime = new Date();
          var timeNow = myTime.getTime();
          var timeDiff = timeNow - clockStart;
          this.diffSecs = timeDiff/1000;
          return(this.diffSecs);
    }
    function getSecs()
    {
          var mySecs = initStopwatch();
          var mySecs1 = ""+mySecs;
          mySecs1= mySecs1.substring(0,mySecs1.indexOf(".")) + " วินาที";
          document.forms[0].timespent.value = mySecs1
          window.setTimeout('getSecs()',1000);
    }

    </script>
  </head>
  <body onLoad="window.setTimeout('getSecs()',1)" >
    <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>



    <div class="py-5" >
    <div class="container">
      <div class="row">
        <div class="col-md-12">
          <h1 class="text-center text-primary display-4">แบบทดสอบแม่ กบ</h1>
          <center>
            <form name="INPUT1" method="post"action="sum.php" onsubmit="return validate()" class="my-3 ">
           คุณอยู่ในหน้านี้มานาน:  <input size=9 name="timespent" value="">

      </center>
        </div>
      </div>

      <div class="py-5" >
      <div class="container">
      <div class="row">
      <div class="col-md-11 order-1 order-md-2">

     <h4 > 1).คำใดอยู่ในมาตราตัวสะกดแม่กบ <BR>

        <input type="RADIO" name="one" value="1">ทัพพี<BR>
        <input type="RADIO" name="one" value="2">ชีวิต<BR>
        <input type="RADIO" name="one" value="3">เชือก<BR>
        <input type="RADIO" name="one" value="4">เมือง<BR>

    <p class="container ">----------------------------------------------------------------------------------------------</p>
    <h4 > 2).ข้อใดเขียนคำอ่านได้ถูกต้อง<BR>
    <input type="RADIO" name="two" value="1">ลาภ อ่านว่า ลาบ<BR>
    <input type="RADIO" name="two" value="2">ยีราฟ อ่านว่า ยี – ร้าบ<BR>
    <input type="RADIO" name="two" value="3">ปรากฏ อ่านว่า ปรา – กด<BR>
      <input type="RADIO" name="two" value="4">กระดาษ อ่านว่า กระ – ดาด<BR>

   <p class="container ">----------------------------------------------------------------------------------------------</p>
   <h4 > 3).ข้อใดเป็นตัวสะกดของคำว่า รูปภา.... อ่านว่า รูบ – พาบ<BR>
 <input type="RADIO" name="three" value="1">พ<BR>
 <input type="RADIO" name="three" value="2">บ<BR>
 <input type="RADIO" name="three" value="3">ป<BR>
   <input type="RADIO" name="three" value="4">ภ<BR>

  <p class="container ">----------------------------------------------------------------------------------------------</p>
  <h4 >4).ข้อใดเขียนตัวสะกดถูกต้อง<BR>
<input type="RADIO" name="four" value="1">ธูป<BR>
<input type="RADIO" name="four" value="2">อาภับ<BR>
<input type="RADIO" name="four" value="3">ลาปยศ<BR>
  <input type="RADIO" name="four" value="4">บดเรียน<BR>

  <p class="container ">----------------------------------------------------------------------------------------------</p>
  <h4 > 5).คำในข้อใดมีตัวสะกดอยู่ในมาตราเดียวกับคำว่า "ทรัพย์"<BR>
  <input type="RADIO" name="five" value="1">มด<BR>
  <input type="RADIO" name="five" value="2">สะดุด<BR>
  <input type="RADIO" name="five" value="3">นายก<BR>
    <input type="RADIO" name="five" value="4">กรอบ<BR>

  <p class="container ">----------------------------------------------------------------------------------------------</p>
  <h4 > 6).“โลภ” มีตัวสะกดอยู่ในมาตราใด<BR>
  <input type="RADIO" name="six" value="1">แม่กก<BR>
  <input type="RADIO" name="six" value="2">แม่กบ<BR>
  <input type="RADIO" name="six" value="3">แม่กง<BR>
  <input type="RADIO" name="six" value="4">แม่กด<BR>

  <p class="container ">----------------------------------------------------------------------------------------------</p>
  <h4 > 7).คำในข้อใดมีตัวสะกดต่างจากคำว่า “ดาบ” <BR>
  <input type="RADIO" name="seven" value="1">ขุด<BR>
  <input type="RADIO" name="seven" value="2">โดดิ์<BR>
  <input type="RADIO" name="seven" value="3">ภาพ<BR>
    <input type="RADIO" name="seven" value="4">ประมาท<BR>

    <p class="container ">----------------------------------------------------------------------------------------------</p>
    <h4 >8).“บาป” มีตัวสะกดอยู่ในมาตราใด<BR>
    <input type="RADIO" name="eight" value="1">แม่กก<BR>
    <input type="RADIO" name="eight" value="2">แม่กบ<BR>
    <input type="RADIO" name="eight" value="3">แม่กง<BR>
      <input type="RADIO" name="eight" value="4">แม่กด<BR>

      <p class="container ">----------------------------------------------------------------------------------------------</p>
      <h4 > 9).ข้อใดเป็นตัวสะกดของคำว่า “เคาร.....” อ่านว่า เคา - รบ<BR>
      <input type="RADIO" name="nine" value="1">พ<BR>
      <input type="RADIO" name="nine" value="2">ป<BR>
      <input type="RADIO" name="nine" value="3">บ<BR>
        <input type="RADIO" name="nine" value="4">ภ<BR>

      <p class="container ">----------------------------------------------------------------------------------------------</p>
      <h4 >10).ข้อใดเป็นตัวสะกดของคำว่า “สู......” อ่านว่า สูบ<BR>
      <input type="RADIO" name="ten" value="1">พ<BR>
      <input type="RADIO" name="ten" value="2">ป<BR>
      <input type="RADIO" name="ten" value="3">บ<BR>
        <input type="RADIO" name="ten" value="4">ภ<BR>
          <!-- ////////////// -->
        <p class="text-center"><br>
          ชื่อผู้ทำข้อสอบ:
          <input type="text" name="user"><br>
         <button type="submit" name="submit" value="6"class="btn btn-primary ">ตรวจคำตอบ</button>
         <a href="javascript:window.print()"><img src="/project/printer.png"></a>
      </form>
      <script>

      function validate() {

      if(!validateGroup(document.getElementsByName("one")))
      {
          alert("ข้อ1 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("two")))
      {
          alert("ข้อ2 ยังไม่ตอบ");
          return false;
      }

      if(!validateGroup(document.getElementsByName("three")))
      {
          alert("ข้อ3 ยังไม่ตอบ");
          return false;
      }

      if(!validateGroup(document.getElementsByName("four")))
      {
          alert("ข้อ4 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("five")))
      {
          alert("ข้อ5 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("six")))
      {
          alert("ข้อ6 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("seven")))
      {
          alert("ข้อ7 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("eight")))
      {
          alert("ข้อ8 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("nine")))
      {
          alert("ข้อ9 ยังไม่ตอบ");
          return false;
      }
      if(!validateGroup(document.getElementsByName("ten")))
      {
          alert("ข้อ10 ยังไม่ตอบ");
          return false;
      }

      return true;
      }

      function validateGroup(elements) {
         for (var i = 0; i < elements.length; i++)
         {
             if (elements[i].checked) return true;
         }
         return false;
      }

      </script>
  </body>
</html>