1.作用域 若函数内没有定义变量,则使用全局变量 若函数内出现了局部变量,那么在定义之前alert为undefined 转载于:https://www.cnblogs.com/iloveyoucc/archive/2012/10/10/2718748.html