标签:
javascript 中instanceof的用法
function Laker(){} function Bull(){} var la = new Laker() ; alert(la instanceof Laker) ;
function Laker(){} Laker.prototype = {} ; function Bull(){} var la = new Laker() ; Bull.prototype = Laker.prototype ; alert(la instanceof Bull) ;
function Laker(){} Laker.prototype = {} ; function Bull(){} Bull.prototype ={paly:function(){ alert("打球") ; }} ; var bu =new Bull() ; bu.paly() ;
function Laker(){} Laker.prototype = {} ; var la = new Laker() ; alert(la instanceof Object ) ;
标签:
原文地址:http://www.cnblogs.com/yaoxiaoxing/p/5145034.html