function test() { $.ajax({ url:xxx, type:'GET', success:function(data) { data:data; function employee(data) { this.customer = function(){console.log(data)} } return new employee(data); } })}var p = new test()p.customer()//沒有找到employee這個(gè)方法 想這樣調(diào)用需要怎么做?
javascrip 異步操作之后返回新對象
收到一只叮咚
2018-12-12 13:19:41