<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