【JavaScript】 模拟JQuery的连续调用函数
连续调用,了解调用主体
var zhangsan = { smoke: function () { console.log("Smoking..."); return this; }, drink: function () { console.log("drinking..."); return this; }, perm: function () { console.log("Perming..."); return this; } } zhangsan.smoke().drink().perm();