<html>
<body>
<form id="f" action="#" method="get">
姓名:<input type="text" id="user" /><p></p>
    密码:<input type="password" id="pass" /><p></p>
    <input type="reset" value="重置" />
    <input type="submit" value="提交" />
</form>
<hr />
<input type="button" value="点点点" onclick="a()" /><br />
<script type= "text/javascript ">
var d = document.getElementById('f');
function a()
{
alert(d.elements[0].type);
}
</script>
</body>
</html>