
jQuery中 非常普遍的用途是将存储在变量中的 jQuery 对象与其他变量区分开。
例如,我将定义:
var $email = $("#email"); // refers to the jQuery object representation of the dom objectvar email_field = $("#email").get(0); // refers to the dom object itself我发现这对于编写 jQuery 代码非常有帮助,并且可以轻松查看具有不同属性集的 jQuery 对象。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)