Return the method used when sending form data : Form Submit « Form Control « JavaScript DHTML






Return the method used when sending form data

   
<html>

<head>
<script type="text/javascript">
function formMethod(){
    var x=document.forms.myForm
    alert(x.method)
}
</script>
</head>

<body>
    <form name="myForm" method="post">
        Name: <input type="text" size="20">
    <br>
    <input type="button" onclick="formMethod()" value="Show method">
    </form>
</body>

</html>



           
         
    
    
  








Related examples in the same category

1.Form Submit action
2.Submit a form Via Enter
3.Convert a passed form reference to a string formatted like a JavaScript array of objects
4.Use form select control to trigger the action
5.form on submit event
6.Last-Minute Checking Before Form Submission
7.Use Image to trigger submit and reset actions
8.Submit a form by sending out an email
9.Adjusting a Server Submission Action
10.Demo: Ajax form submit
11.html input mask