首先看下面的JavaScript对象
var settings = {
user:"someuser",
password:"password",
country:"Country",
birthplace:country
}
我想将birthplace值设置为与相同country,因此我将对象值country放在前面,birthplace但它对我没有用,我也使用过this.country但仍然失败。我的问题是如何访问对象内对象的属性。
一些用户沉迷于询问“您想做什么或发送脚本等”,这些ppls的答案很简单:“我想访问对象内的对象属性”,并且上面提到了脚本。
萧十郎
相关分类