<body>
     <input type="checkbox" name="a"  />
     <input type="text" name="b" />
       <script>
          alert(a.type);
          alert(b.type);
       </script>
   </body>