If you would like to print out all the properties of an Javascript object and their associated values, do this:
Note: Replace < objName > below with the name of your instantiated object.
var str;
for(prop in < objName >)
{
str += prop + ' value :' + < objName >[prop]+ '\n ';
}
alert(str); //Show all properties and its value
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Thank you for your comment.