<html>
<head>
<script language="javascript">
function test() {
alert(frm.Button1.value);  //在这儿提示出错:Button1 无法访问,为什么?
var btn = document.getElementById("Button1");//提示出错:对象方法不存在?
alert(btn.value);
}
</script>
<title></title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name=ProgId content=VisualStudio.HTML>
<meta name=Originator content="Microsoft Visual Studio .NET 7.1">
</head>
<body>
<form id=frm>
<input type="button" value="clickhere" onclick="test()" ID="Button1" NAME="Button1"/>
</form>
</body>
</html>
1、button在form里面,所以不能直接访问到
2、getElementById,d要小写