[英]IE8 - “is null or not an object” error
我有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为null或不是对象”
我在这里调用函数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'
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.