xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>高手教程(study.p2hp.com)</title>
<script>
function displayResult(){
var x=document.getElementById("button1").type;
alert(x);
}
</script>
</head>
<body>
<form>
<input type="button" onclick="displayResult()" value="显示按钮类型" id="button1">
</form>
</body>
</html>