日期:2014-05-16  浏览次数:20627 次

这样为什么无法获得表单数据

<!--javascript部分>
<script type="text/javascript">
            function OnUpLoad() {
               
                var Uname = document.getElementById("ItId").value;
                var Una = document.getElementById("ItName").value;
                var Un = document.getElementById("StreentAddress").value;
             
                    alert(Uname+Una+Un);   //正常的
    
                document.getElementById("F1").submit();
            }
        </script>
<!--html部分-->
 <form  id="F1" action="Handler.ashx" method="get">
        <table>
            <tbody>
                <tr><td><label>Id</label><td>
                    <td><input type="text" id="ItId"/></td>
                
                </tr>
                <tr>
                    <td><label>Name:</label></td>
                   <td> <input type="text" id="ItName" /></td>
                </tr>
               <tr> 
                   <td>Address:</td>
                   <td> <input type="text" id="StreentAddress" /></td>
               </tr>
               <tr> 
                   <td>
                    <input type="button" value="提交" onclick="OnUpLoad()" id="But1"/>
            &nbs