This is a forum where members new and old can come to ask questions and get info and opinions. It is not a place to advertise your business or have other forms of advertising, whether it be in your posts or signature.

All links in the forum will not be indexed by Search Engines and any unapproved forms of advertising or spam will be dealt with accordingly, deleted, and that member's account banned.

Forums

Overview » Ajax & JavaScript » How to know properties of an object ?
Reply

How to know properties of an object ?

Karthik Surendran
Member



Since: 06 Aug 2008
Posts: 4
Posted 06 Aug 2008 14:02:00

How to know properties of an object ?

Any idea........

try this script

function getProperties() {
var input = prompt('Please enter the element name');
var element = document.createElement( input );
for( var props in element ) {
alert( props );
}

}

How to know properties of an object ?

Any idea........

try this script

function getProperties() {
var input = prompt('Please enter the element name');
var element = document.createElement( input );
for( var props in element ) {
alert( props );
}

}
Georgi Kralev
Zone Administrator



Since: 15 Nov 2006
Posts: 1,422
Replied 06 Aug 2008 22:32:44
The following article discuss this approach in more details:
www.webreference.com/js/column79/9.html

Georgi Kralev

Homepage: gdkralev.googlepages.com

Reply to this topic

Message
Reply
Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency