<script lanuage="javascript">
var global="javascript";
test();
funciton test()
{
var local="vbscript"
document.write("the global is"+gloabl+"<br>");
document.write("the local is"+local+"<br>");
}
document.write("local");
</script>
----------------------------------
错误local已经释放掉了,它的作用域是函数范围内
<script language="javascript">
for(var i; = 0; i < 9; i++)
{
document.write(i+"<br>");
}
document.write(i);
--------------------
i没有被释放,它的作用域是定义后的范围
http://www.cnblogs.com/sanshisong/archive/2006/11/06/552252.html