案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function showMethod()
5
  {
6
  var x=document.getElementById("myForm")
7
  alert(x.method)
8
  }
9
</script>
10
</head>
11
<body>
12
13
<form id="myForm" method="post">
14
名称:<input type="text" value="米老鼠" />
15
<input type="button" onclick="showMethod()" value="显示 method" />
16
</form>
17
18
</body>
19
</html>
20