<html>
<head>
<script>
function displayResult()
{
var x=document.getElementById("email").type;
alert(x);
}
</script>
</head>
<body>
<form>
Email: <input type="text" id="email">
</form>
<button type="button" onclick="displayResult()">显示 input 类型</button>
</body>
</html>