摘要: 1.使按钮无法点击 $(“#btn”).attr("disable",true); 2.返回上一个页面 history.back(-1); 3.$(this).siblings() 查找每个 p 元素的所有类名为 "selected" 的所有同胞元素: $("p").siblings(".selec 阅读全文
posted @ 2018-05-11 20:27 choko_oni 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1. Math.floor() 向下取整 2.Math.random() 取一个浮点随机数 3.Math.round() 四舍五入后一个最接近的整数 4.Math.ceil() 向上取整 5.Math.abs(x) 函数返回指定数字 “x“ 的绝对值。 更多参考MDN WebDocs: https: 阅读全文
posted @ 2018-05-11 09:24 choko_oni 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 1.判断是否为数字:isNaN() 函数用来确定一个值是否为NaN,或者用Number.isNaN()或者 可以使用typeof 来判断该值是否为一个非数字。 语法:isNaN(testValue) 原链接: https://developer.mozilla.org/zh-CN/docs/Web/ 阅读全文
posted @ 2018-05-11 09:18 choko_oni 阅读(215) 评论(0) 推荐(0) 编辑