摘要: 1.Math.random(); 结果为0 1间的一个随机数(包括0,不包括1) 2.Math.floor(num); 参数num为一个数值,函数结果为num的整数部分。 3.Math.round(num); 参数num为一个数值,函数结果为num四舍五入后的整数。 Math:数学对象,... 阅读全文
posted @ 2015-12-10 21:28 coding不止步 阅读(384) 评论(0) 推荐(0) 编辑
摘要: ``` //获取className元素 function getClassNames(classStr,tagName){ ///获得类名为className,标签名为tagName的元素 if (document.getElementsByClassName) { return document.getElementsByClassName(classS... 阅读全文
posted @ 2015-12-10 21:18 coding不止步 阅读(3926) 评论(0) 推荐(0) 编辑
摘要: ``` //jQueryx 实现slideLeft 和slideRight方法 $.fn.slideLeftHide = function(speed, callback) { this.animate({ width: "hide", paddingLeft: "hide", paddingRight: "hide", ma... 阅读全文
posted @ 2015-12-10 21:16 coding不止步 阅读(940) 评论(0) 推荐(0) 编辑