[問題] loop object property

看板Ajax作者 (阿蹦)時間9年前 (2015/12/25 14:20), 編輯推噓2(208)
留言10則, 4人參與, 最新討論串1/1
http://i.imgur.com/cJXBszv.jpg
上圖最後只為一個image附值 需改為thestatus[thename] = 'normal'才可, 請問原因是 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 180.217.181.211 ※ 文章網址: https://www.ptt.cc/bbs/Ajax/M.1451024455.A.857.html

12/25 15:05, , 1F
弄個迴圈總有個目的吧..看起來這個迴圈的目的是命名啊
12/25 15:05, 1F

12/25 15:40, , 2F
這只是舉例,
12/25 15:40, 2F

12/25 17:07, , 3F
object.property <=> object["property"]
12/25 17:07, 3F

12/25 21:44, , 4F
在這例不成立
12/25 21:44, 4F

12/27 22:28, , 5F
你確定theName這個變數的值等於theName?
12/27 22:28, 5F


12/27 22:40, , 7F
蓤隇
12/27 22:40, 7F

12/28 02:30, , 8F
theStatus.theName => theStatus["theName"]
12/28 02:30, 8F

12/28 02:30, , 9F
theStatus["theName"] 和 theStatus[theName] 的意義是不
12/28 02:30, 9F

12/28 02:31, , 10F
一樣的唷
12/28 02:31, 10F
文章代碼(AID): #1MVE17XN (Ajax)
文章代碼(AID): #1MVE17XN (Ajax)