<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<input type="button" name="Button" value="Button" onclick="aa()">
<script language="JavaScript">
function aa()
{
alert(window.event.srcElement.type) ;
}
</script></body>
</html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<input type="button" name="Button" value="Button" onclick="aa()">
<script language="JavaScript">
function aa()
{
alert(window.event.srcElement.type) ;
}
</script></body>
</html>
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++){
alert(a[i].type);
</script>
var a = document.getElementsByTagName("input");
for (var i=0; i<a.length; i++){
document.write(a[i].type);
</script>