首先看下面的JavaScript對象var settings = { user:"someuser", password:"password", country:"Country", birthplace:country}我想將birthplace值設(shè)置為與相同country,因此我將對象值country放在前面,birthplace但它對我沒有用,我也使用過this.country但仍然失敗。我的問題是如何訪問對象內(nèi)對象的屬性。一些用戶沉迷于詢問“您想做什么或發(fā)送腳本等”,這些ppls的答案很簡單:“我想訪問對象內(nèi)的對象屬性”,并且上面提到了腳本。
訪問對象內(nèi)的對象屬性
三國紛爭
2019-12-03 15:34:21