This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to know object type?

 
ankur rathi
Ranch Hand
Posts: 3830
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We usually get any object in JS like:

document.getElementById('anyId')

How can we know, whcih object it is??

Thanks.

[ June 15, 2006: Message edited by: Bear Bibeault ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean which object? You talking if it is a div or span? Wouldn't you know what it is to begin with?

Eric
[ June 15, 2006: Message edited by: Eric Pascarello ]
 
Manesh Kumar
Ranch Hand
Posts: 94
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a typeof function in Javascript, but it is not very specific.

If you want what is the element type,

this might help you.


However, I have never found any use of it till now.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic