0

我有 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 为空或不是对象”

4

1 回答 1

0

我在这里调用函数 processResultCount:

var jsonFormOptions = {
    // dataType identifies the expected content type of the server response
    dataType: 'json',
    // success identifies the function to invoke when the server response
    // has been received
    success: processResultCount(),
    error: handleResultCountError,
    // will be overridden in setupExtSearchFormBindings()
    url: jsonFormUrl,
    type: 'get'
}
于 2013-09-26T12:24:18.647 回答