IE9
在IE7
模式下我收到以下错误。使用一个小的计数脚本:
SCRIPT1028:预期的标识符、字符串或数字
代码
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
speed: 1000, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 2, // the number of decimal places to show
onUpdate: null, // callback method for every time the element is updated,
onComplete: null, // callback method for when the element finishes updating
};
第 185 行是最后一个大括号和分号
我们需要它来工作,IE7
但这个错误正在破坏脚本。