会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Cat in dotNET
Imagination is more important than knowledge.
博客园
首页
新随笔
联系
管理
订阅
2009年12月18日
js作用域
摘要: 1.js的作用域是有函数划分的,而不是块儿 var too="test"; if(true){//这是在块中的定义,此时还是全局变量 var too="new test"; } alert(too=="new test");//return true; function test() { var too="old test";//这是在函数中的定义,此时是局部变量 } test(); alert...
阅读全文
posted @ 2009-12-18 10:41 Cat Qi
阅读(12976)
评论(6)
推荐(5)
编辑
公告