jQuery代碼:如何將元素添加到jQuery中的現有對象?
var addproperty = {
OwnerName: OwnerName,
OwnerEmail: OwnerEmail,
OwnerMobile: OwnerMobile,
OwnerType: OwnerType,
Propertyfor: Propertyfor,
ProjectName: ProjectName,
ProjectAddress: ProjectAddress,
State: State,
City: City,
Area: Area,
ProjectType: ProjectType,
BHK: BHK,
Bathroom: Bathroom,
Balcony: Balcony,
Builtup: Builtup,
Carpet: Carpet,
Unit: Unit,
Furnish: Furnish
}
if(Propertyfor == 'rent'){
$(addproperty).extend({
RentPossessionDate: RentPossessionDate,
MonthlyRent: MonthlyRent,
Maintanace: Maintanace,
SecuiryDeposit: SecuiryDeposit,
Bachelors: Bachelors,
RentNegotiable: RentNegotiable
});
它不插入新元素插入現有的對象與addproperty
。我的編碼錯誤在哪裏?
沒問題老兄字符串轉換,但現在它的工作,我會接受6分鐘 –
不客氣內你的答案,很樂意幫助 –