js|js 中的属性以数字开头的属性和取值
事例Json:
{"total":13,"rows":[{"hospitaltotal":57338127.7400,"total":59099795.9870,"08_clinic":200.0000,"09_hostipal":5840941.3100,"01_clinic":738864.0840,"11_hostipal":5902347.7500,"clinictotal":1761668.2470,"02_hostipal":4536070.4900,"06_hostipal":0.0000,"15_clinic":30832.5000,"orgcode":"420527070001","05_clinic":145116.8000,"orgname":"xxxxxx","12_hostipal":507978.8600,"15_hostipal":5399068.7200,"showtime":"xxxx年","09_clinic":191929.2000,"07_hostipal":4182589.2200,"02_clinic":333004.6630,"07_clinic":7526.0000,"05_hostipal":10810777.8800,"12_clinic":640.0000,"04_hostipal":4864970.8300,"14_hostipal":0.0000,"10_hostipal":3389179.8800,"11_clinic":3188.0000,"14_clinic":126270.0000,"01_hostipal":6132355.0500,"06_clinic":1.0000,"10_clinic":33872.0000,"04_clinic":150224.0000,"08_hostipal":5771847.7500}]}将其变为对象之后:变为对象就不写了啊
解决办法:
var temp=row['01_clinic'];
//不能这样取值row.01_clinic 这样会报错
【js|js 中的属性以数字开头的属性和取值】转载于:https://www.cnblogs.com/J2EEPLUS/archive/2012/04/25/2487876.html
推荐阅读
- 热闹中的孤独
- 第6.2章(设置属性)
- 爱就是希望你好好活着
- JS中的各种宽高度定义及其应用
- 叙述作文
- 我眼中的佛系经纪人
- 《魔法科高中的劣等生》第26卷(Invasion篇)发售
- Android中的AES加密-下
- 放下心中的偶像包袱吧
- 以读攻“毒”唤新活动曹彦斌打卡第二天