Input element detection in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Debasis Jana
    New Member
    • Mar 2011
    • 4

    Input element detection in IE

    Code:
    var el = document.getElementById('element-id');
    alert(el);
    Mozilla returns its class name(HTMLInputE lement) but IE returns Object.
    In mozilla if i do
    Code:
    alert(el instanceof HTMLInputElement)
    , returns true; but in IE, it says HTMLInputElemen t is undefined. Even if i do
    Code:
    alert(el instanceof Object)
    in IE, it says false.

    How do i detect exact object type in IE?
    http://krook.org/jsdom/]this only implemented in Mozilla family? Isn't implemented in IE? How to do it in IE?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    it seems like IE is restricting the access to certain interfaces, from what I have seen you would have to test for nodeType and tagName.

    Comment

    Working...