View Full Version : Getting a property's value

08-08-2006, 05: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


08-08-2006, 06: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