摘要: function test() { a = 30; var b = 20; } test(); console.log("a="+a); //这里很明显,a为全局变量 console.log("b="+b);//b为局部变量,故在函数test外调用是,提示未定义 var reg = /(^[A-Za 阅读全文
posted @ 2017-07-20 17:16 shenq2014 阅读(322) 评论(0) 推荐(0) 编辑