关于HTMLElement的扩展子类
var i=document.createElement('img'); var img=document.getElementById('img'); var inputbt=document.getElementById('inputbt'); var bt=document.getElementById('bt'); alert(img instanceof HTMLImageElement);//true alert(inputbt instanceof HTMLInputElement);//true alert(inputbt instanceof HTMLButtonElement);//false alert(bt instanceof HTMLButtonElement);//true
alert(document instanceof HTMLDocument);//true
alert(document.documentElement instanceof HTMLHtmlElement);//true