最高半折刷qq各种业务和钻(家里人自己开的,尽管放心,大家多捧捧场)

sking7

导航

__proto和HTMLElement的扩展子类

__ptoto__:https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/Proto

关于HTMLElement的扩展子类

http://krook.org/jsdom/HTMLElement.html

 

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

<body>
<IMG id="img" SRC="http://drmcmm.baidu.com/media/id=PHnsrHbLPj6&gp=401&time=nHn1nHD3P1R3rf.jpg" ALT="PIC"/>
<BUTTON TYPE="BUTTON" onclick="a()" id="bt">ok</BUTTON>
<input TYPE="button" value="cancel" id="inputbt"/>
</body>




posted on 2012-03-09 15:22  G.N&K  阅读(362)  评论(0编辑  收藏  举报