最佳答案
Possible Duplicate:
Access JavaScript Object Literal value in same object
First look at the following JavaScript object
var settings = {
user:"someuser",
password:"password",
country:"Country",
birthplace:country
}
I want to set birthplace
value same as country
, so i put the object value country
in-front of birthplace
but it didn't work for me, I also used this.country
but it still failed. My question is how to access the property of object within object.
Some users are addicted to ask "what you want to do or send your script etc" the answer for those people is simple "I want to access object property within object" and the script is mentioned above.
Any help will be appreciated :)
Regards