finding class name of an object in js

    Date: 05/11/07 (Web Development)    Keywords: no keywords

    Is there a way to find the class name of variable?

    typeof(obj); //<-- only says 'object'

    obj instanceof MyClass // <- returns boolean

    But I want the equivalent of ruby's class() method.

    obj.class() # <- outputs 'MyClass'

    Source: http://community.livejournal.com/webdev/407275.html

« CSS Colour Changing - Help? || The Future of the Web... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home