<head>
<title>练习</title>
<script type="text/javascript" >
function f1() {
var inputs = document.getElementsByName("input");
for (var i = 0; i < inputs.length; i++) {
var input = inputs;
input.onfocus = f2;
input.onblur = f3;
}
}
function f2() {
this.style.background = "red";
}
function f3() {
this.style.background = "white";
}
</script>
</head>
<body>
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
<input type="text" /><br />
</body>
垃圾回收器准备好释放对象占用的存储空间,将首先调用其finalize()方法,在下一次垃圾回收动作发生时才会真正回收对象占用的内存。上面这个程序出不了结果
|
|