index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);出自这个方法: Run: function(index) {
//修正index
index == undefined && (index = this.Index);
index < 0 && (index = this._count - 1) || index >= this._count && (index = 0);
//设置参数
this._target = -Math.abs(this.Change) * (this.Index = index);
this._t = 0;
this._b = parseInt(CurrentStyle(this._slider)[this.options.Vertical ? "top" : "left"]);
this._c = this._target - this._b;
this.onStart();
this.Move();
}
谢谢啊,急
解决方案 »
- 问下jquery的filetree怎么样使用?
- 这段js代码要实现的功能是什么,涉及到google的jsapi。
- WEB前端交互快速开发指南
- JS打开[保存文件对话框]出错:Automation server can't create object
- 自助设计
- 关于button的点击次数请教大家
- 网上找的一段JS图片切换代码,运行着有问题,为什么缩略图可以显示但是大图无法显示??求助大神~~~~~~
- 一个点击联接的问题
- 怎么给轮播图片加入标题和内容
- 百度ueditor 1.4.3在win2003+IIS6环境下不能上传图片,高手救我!
- ajaxfileupload 支持多文件上传吗
- for 循环异常退出
就是一个赋值啊``如果index小于0就执行(index = this._count - 1) 如果index >= this._count 就执行 index = 0
if (index < 0) index = this._count - 1;
else {
if (index >= this._count) index = 0;
}这是利用了运算符的优先级、结合性(具有相同优先级的运算符按从左至右的顺序求值)和逻辑与、逻辑或运算的简便运算特性,这里涉及到的优先级(高到低):
< >=
&&
||
=简便运算特性是指:
&&运算时,如果第一个运算数值为false,不再计算第二个运算数值
||运算时,如果第一个运算数值为true,不再计算第二个运算数值
噢,谢谢啊,明白了