非常普遍的用途是将存储在变量中的 对象与其他变量区分开。
例如,我将定义:
var $email = $("#email"); // refers to the jQuery object representation of the dom object
var email_field = $("#email").get(0); // refers to the dom object itself
为什么JavaScript变量会以美元符号开头?
非常普遍的用途是将存储在变量中的 对象与其他变量区分开。
例如,我将定义:
var $email = $("#email"); // refers to the jQuery object representation of the dom object
var email_field = $("#email").get(0); // refers to the dom object itself