Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/364.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript JSLint:意外结束_Javascript_Jquery_Jslint - Fatal编程技术网

Javascript JSLint:意外结束

Javascript JSLint:意外结束,javascript,jquery,jslint,Javascript,Jquery,Jslint,抱怨并说: $.fn.hasScrollBar = function () { "use strict"; return this.get(0).scrollHeight > this.height(); } 有什么问题吗?因为它是函数表达式(不是函数声明),所以应该以分号结尾: Unexpected '(end)'. } line 5 character 1 $.fn.hasScrollBar=函数(){ “严格使用”; 返回this.get(0.scrollHei

抱怨并说:

$.fn.hasScrollBar = function () {
    "use strict";

    return this.get(0).scrollHeight > this.height();
}

有什么问题吗?

因为它是函数表达式(不是函数声明),所以应该以分号结尾:

Unexpected '(end)'.
}
line 5 character 1
$.fn.hasScrollBar=函数(){
“严格使用”;
返回this.get(0.scrollHeight>this.height();

}; // 因为它是一个函数表达式(不是函数声明),所以应该以分号结尾:

Unexpected '(end)'.
}
line 5 character 1
$.fn.hasScrollBar=函数(){
“严格使用”;
返回this.get(0.scrollHeight>this.height();
}; //