摘要: 1、定义全局变量:直接在函数内部省略var操作符,既定义为全局变量(不推荐使用,很难维护,在严格模式下会抛出ReferenceError错误)function test(){ message = "helloWorld!";}test();alert(message);输出:helloWorld... 阅读全文
posted @ 2014-10-20 11:42 tt_sj 阅读(269) 评论(0) 推荐(0)