jQuery中(functioon(){...};)()的解释

来源:互联网 发布:淘宝网无机硅纳米涂层 编辑:程序博客网 时间:2024/05/04 16:59

 

The ( ) operator is used to invokefunctions in JavaScript. This is an unusual operator in that it does not have afixed number of operands. The first operand is always the name of a function oran expression that refers to a function. It isfollowed by the left parenthesis and any number of additional operands, whichmay be arbitrary expressions, each separated from the next with a comma. Theright parenthesis follows the final operand. The ( ) operator evaluates each ofits operands and then invokes the function specified by the first operand, withthe values of the remaining operands passed as arguments.

 

摘自《JavaScript: The Definitive Guide, 4th Edition

 

原创粉丝点击