英 [?meθ?d]? ?美 [?m?θ?d]??

n.方法;條理

復(fù)數(shù): methods

javascript method屬性 語法

作用:設(shè)置或返回用于表單提交的 HTTP 方法。

語法:formObject.method=get|post

javascript method屬性 示例

<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>

運(yùn)行實(shí)例 ?

點(diǎn)擊 "運(yùn)行實(shí)例" 按鈕查看在線實(shí)例