...

View Full Version : Getting a property's value



pilau
08-08-2006, 06:55 PM
Hi, I was wondering if I could get a property's value within a code like this:

for (property in object)
{
if (property == 'src')
{
// get the value here
}
}

Thanks

jkd
08-08-2006, 07:31 PM
In Javascript, someObject.property is equivalent in every way to someObject["property"]. Thus you can access the value in your particular case as object[property].



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum