2011-03-16 71 views
0
<html> 
    <head> 
     <script> 
      function goSubmit() 
      { 
       document.frm.submit(); 
      } 
     </script> 
    </head> 
    <body> 
     <form action ="view1.jsp" method="post" name="frm"> 

      <table> 
       <tr> 
        <td> 
         <input type="radio" name="rg" value="faculty" onClick="goSubmit()"/> 
        </td> 

        <td> 
         <input type="radio" name="rg" value="date" onClick="goSubmit()"/> 
        </td> 

        <td> 
         <input type="radio" name="rg" value="content" onClick="goSubmit()"> 
        </td> 
       </tr> 
      </table> 
     </form> 
    </body> 
</html> 

回答

0

試試這個:

<html> 
<head> 
<script> 
    function goSubmit() { 
     document.forms.frmTest.submit(); 
    } 
</script> 
</head> 
</html> 
<body> 
    <form action="/process.php" method="get" name="frmTest"> 
     <table> 
      <tr> 
       <td> 
        <input type="radio" name="rg" value="faculty" onClick="goSubmit();"/> 
       </td> 

       <td> 
        <input type="radio" name="rg" value="date" onClick="goSubmit();"/> 
       </td> 

       <td> 
        <input type="radio" name="rg" value="content" onClick="goSubmit();"> 
       </td> 
      </tr> 
     </table> 
    </form> 
</body> 
+0

是其工作的感謝 – sasi 2011-03-16 09:44:07

+1

您可以點擊UP鍵,如果你找到解決辦法有用; d – 2011-03-16 10:00:47