Forums

This topic is locked

How to know properties of an object ?

Posted 06 Aug 2008 14:02:00
1
has voted
06 Aug 2008 14:02:00 Karthik Surendran posted:
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 );
}

}

Replies

Replied 06 Aug 2008 22:32:44
06 Aug 2008 22:32:44 Georgi Kralev replied:
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