摘要: new Date (' 2017-12-12 12:01:00') 在ios 下会返回 NaN ' 2017-12-12 12:01:00.000' 时间格式也会返回NaN 要将- 转化为/ new Date(' 2017-12-12 12:01:00'.replace(/\-/g, '/')) n 阅读全文
posted @ 2018-11-09 14:53 暮色之雪的诀别之海 阅读(1244) 评论(0) 推荐(0) 编辑
摘要: var cookie = { set: function (key, val, time) { //设置cookie方法 var date = new Date(); //获取当前时间 var expiresDays = time; //将date设置为n天以后的时间 date.setTime(da 阅读全文
posted @ 2018-10-12 10:40 暮色之雪的诀别之海 阅读(119) 评论(0) 推荐(0) 编辑
摘要: <html> <input type="file" id="upPic"> <div> <img src="" alt="上传的图片" id="imgs"> </div> <div> <img src="" alt="上传的图片" id="imgs"> </div> <html> <javascri 阅读全文
posted @ 2018-10-11 17:57 暮色之雪的诀别之海 阅读(264) 评论(0) 推荐(0) 编辑
摘要: 1. 一个对象的 __proto__ 和 prototype 指向同一个值 (通常这个值叫做原型);prototype是构造函数特有的 别的对象都没有这种属性 2.关于js 中this的指向性问题 var a = { foo : function(){ console.log(this); } }; 阅读全文
posted @ 2018-08-23 10:08 暮色之雪的诀别之海 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1.select 的操作: 获取select选中的项的值 $('#aa option:selected').val(); $('#aa option:selected').text(); js设置select选中的项 $("#aa option:first").prop("selected", 's 阅读全文
posted @ 2018-08-21 18:03 暮色之雪的诀别之海 阅读(79) 评论(0) 推荐(0) 编辑
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2018-08-02 18:52 暮色之雪的诀别之海 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 1. navigator.userAgent() 从浏览器获得值 ‘Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36’。 Moz 阅读全文
posted @ 2018-07-30 19:23 暮色之雪的诀别之海 阅读(76) 评论(0) 推荐(0) 编辑