摘要:
function load(src,resolve,reject){ let image=new Image(); image.src=src; image.onload=resolve; image.onerror=reject; } load( "../images/1.jpg", ()=>{ 阅读全文
摘要:
let module=(function(){ const moduleList={}; function define(name,modules,action){ modules.map((m,i)=>{ modules[i]=moduleList[m]; }) moduleList[name]= 阅读全文
摘要:
function User(){} function Admin(){} Admin.prototype=Object.create(User.prototype); let hd=new Admin(); console.log(hd instanceof Admin); console.log( 阅读全文