UK [ˈmeθəd] US [ˈmɛθəd]

n.Method; level

Plural: methods

javascript method attribute syntax

Function:Set or return the HTTP method used for form submission.

Syntax: formObject.method=get|post

javascript method attribute example

<html>
<head>
<script type="text/javascript">
function showMethod()
  {
  var x=document.getElementById("myForm")
  alert(x.method)
  }
</script>
</head>
<body>

<form id="myForm" method="post">
名称:<input type="text" value="米老鼠" />
<input type="button" onclick="showMethod()" value="显示 method" />
</form>

</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance