我有 HTML:
<td style="vertical-align: bottom;"><div id="resultCount">n.v.</div></td>
和 JavaScript:
function processResultCount(data) {
$("#resultCount").html(formatNumber(data.resultCount, "."));
$("#resultCount2").html(formatNumber(data.resultCount, "."));
for (property in data) {
var value = data[property];
$("#" + property).html(formatNumber(value, "."));
}
function formatNumber(nStr, delimiter) {
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
.....
......
在 IE8 中,我收到错误:“resultCount 为空或不是对象”