读书人

学习JavaScript(2)

发布时间: 2012-09-09 09:27:54 作者: rapoo

学习JavaScript(二)
Checking if a Variable Exists

(function(name){alert('Hello ' + name + '!');})('dude')


One good reason for using self-invoking anonymous functions is to have some
work done without creating global variables.
A drawback, of course, is that you cannot execute the same function twice
























读书人网 >JavaScript

热点推荐