function BroswerAllInput(formE)
{
  //如何获取formE对象下的所有input 对象
}<form onsubmit="return BroswerAllInput(this)">
<input type="text" name="email" >
</form>
<form onsubmit="return BroswerAllInput(this)">
<input type="text" name="age" >
</form>

解决方案 »

  1.   

    document.getElementsByTagName("input");
      

  2.   

    <body>
        <form id="form1" name="form1" method="post" action='' onsubmit="_post(this);return false;">
        <input name="Title" type="text" id="Title" />
        <input name="Title2" type="text" id="Title" />
        <input type="submit" name="button" value="提交" />
        </form>    <form id="form2" name="form1" method="post" action='' onsubmit="_post(this);return false;">
        <input name="Title0" type="text" id="Title" />
        <input name="Title02" type="text" id="Title" />
        <input name="Title03" type="text" id="Title" />
        <input name="Title04" type="text" id="Title" />
        <input type="submit" name="button" value="提交" />
        </form>
     </body>
     <script type="text/javascript">
     <!--
    var collInput = document.getElementById("form1").getElementsByTagName("input");
    alert(collInput.length);
    collInput = document.getElementById("form2").getElementsByTagName("input");
    alert(collInput.length);
     //-->
     </script>
    </html>
      

  3.   

    $("input").each(function(){$(this).html()});
      

  4.   

    function BroswerAllInput(formE)
    {
      document.getElementsByTagName("input");
    }
      

  5.   

    function BroswerAllInput(formE)
    {
     var obj=formE.getElementsByTagName("input"); for(var i=0;i<obj.length;i++)
     {
     alert(obj[i].value)
     alert(obj[i].type)//获取类型type
     }
    }