// Create new object in the hash variable
var hash = new Object;
// Set wishard_modality variable to OBR.24.1
var wishard_modality = msg['OBR']['OBR.24']['OBR.24.1'].toString();
// Assign replacement values for the hash variable
hash.CAT = 'CT'; //Computed Tomography
hash.CT = 'CT'; //Computed Tomography
hash.RAD = 'CR'; //Computed Radiography
hash.CR = 'CR'; //Computed Radiography
hash.MRI = 'MR'; //Magnetic Resonance
我正在尝试添加
hash.999-other = 'OT';
但我收到一个错误=第33行出现错误:缺少;声明前
JavaScript变量(和函数)名称规则:
_
,$
或字母字符开头。_
开头,则必须至少跟一个数字,字母字符或$
。_
和$
。因此名称999-other
不允许。