a = 1;function f() { alert(a); var a = 2;}f();這代碼不應該輸出2嗎?
javascript函數(shù)作用域和聲明提前
哈士奇WWW
2018-11-13 17:15:51