Ash*_*Ash 1 javascript jquery if-statement logical-operators
我只是使用带有逻辑运算符的If语句.我不知道它为什么显示sytax错误.
var divWidth = $("#columnwraper").width(); //getting the width of the div
$("#right-button").click(function() {
if (cursor != totalWidth && totalWidth !< divWidth) {
$box2.animate({
marginLeft : "-=300"
}, "fast");
cursor += 100;
}
// console.log(colwidth.width());
});
Run Code Online (Sandbox Code Playgroud)
它表明了这一点
[15:18:24.050]条件后的SyntaxError:missing).
我在这做错了什么?
这样说吧:
if (cursor != totalWidth && !(totalWidth < divWidth))
Run Code Online (Sandbox Code Playgroud)
!<
不是运营商.
归档时间: |
|
查看次数: |
1062 次 |
最近记录: |