<html>
<head>
<script>
//查看input标签有哪些属性和事件
function a() {
var str = new String("str");
var allAttr = "";
for(var attr in document.getElementById("abc")) {
allAttr += attr + ",";
}
document.getElementById("show").innerHTML = allAttr;
}
</script>
</head>
<body οnlοad="a();">
<input type="text" id="abc"/>
<div id="show"></div>
</body>
</html>