这是什么逻辑:
object = object = function
我在 jQuery 中经常看到这个,例如 1.4.4 行 99:
为什么要使用这种语法?
object = object = function
我在 jQuery 中经常看到这个,例如 1.4.4 行 99:
jQuery.fn = jQuery.prototype = {
init: function( selector, context ) {
或第332行:
jQuery.extend = jQuery.fn.extend = function() {
为什么要使用这种语法?
var obj = {...}; jQuery.fn = obj; jQuery.prototype = obj; delete window.obj
; - Ruan Mendes