我的IE8浏览器报错如下:
在 custom.js 文件中,第82行第7个字符处发生 "Object doesn't support this property or method" 错误。
以下是带有行号的代码:
78 function transpose(chord, increment){
79 var scale = ["C", "C#", "D", "Es", "E", "F", "F#", "G", "As", "A", "B", "H"];
80 return chord.replace(/[CDEFGABH]#?s?/g,
81 function(match){
82 var i = (scale.indexOf(match) + increment) % scale.length;
83 return scale[ i < 0 ? i + scale.length : i ];
84 });
85 }
我应该做哪些更改,以使代码在IE8中正常工作?它在Firefox/Chrome中也能正常工作,并且在IE9中也能正常工作。