• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
JS小灰童鞋
博客园    首页    新随笔    联系   管理    订阅  订阅
上一页 1 2 3 4 5 下一页
2016年2月2日
微信分享
该文被密码保护。 阅读全文
posted @ 2016-02-02 17:39 JS小灰童鞋 阅读(3) 评论(0) 推荐(0)
2016年2月1日
活动倒计时,精确到毫秒
摘要: <!DOCTYPE html><html> <head> <meta charset="utf-8"> <title>活动倒计时代码(精确到毫秒)</title></head> <body> <script type="text/javascript" src="http://code.jquery 阅读全文
posted @ 2016-02-01 13:36 JS小灰童鞋 阅读(520) 评论(0) 推荐(0)
下拉刷新,加载更多
该文被密码保护。 阅读全文
posted @ 2016-02-01 11:19 JS小灰童鞋 阅读(2) 评论(0) 推荐(0)
2016年1月29日
判断数据类型
摘要: Object.prototype.toString.call([]); Object.prototype.toString.call({}); // toLowerCase() 转化成小写 与 typeof 返回值同步 阅读全文
posted @ 2016-01-29 15:50 JS小灰童鞋 阅读(120) 评论(0) 推荐(0)
ECMAScript数据类型
摘要: 【 基本数据类型 】-->5种 Undefined Null Boolean Number String 【 复杂数据类型 】-->1种 Object 【 typeof 返回值】 -->6种 "undefined" "boolean" "string" "number" "object" "func 阅读全文
posted @ 2016-01-29 15:34 JS小灰童鞋 阅读(168) 评论(0) 推荐(0)
小结1
摘要: <script> var name = "jack"; age = "18"; //console.log(name,age); //不报错 但不推荐 function test(){ gender = "man"; //全局变量 但必须调用一次该函数 } test(); console.log(g 阅读全文
posted @ 2016-01-29 15:25 JS小灰童鞋 阅读(105) 评论(0) 推荐(0)
生成有序的随机数
摘要: <script> function randomNumber(n, start, end) { var i = 0, arr = []; for (; arr.length < n; i++) { var num = Math.floor(Math.random() * (end - start)) 阅读全文
posted @ 2016-01-29 13:10 JS小灰童鞋 阅读(567) 评论(0) 推荐(0)
原生的on事件代理
摘要: <script> // jQuery $('.el').on('event', function() { }); // 原生方法 [].forEach.call(document.querySelectorAll('.el'), function(el) { el.addEventListener( 阅读全文
posted @ 2016-01-29 11:28 JS小灰童鞋 阅读(320) 评论(0) 推荐(0)
原生的切换类
摘要: <script> $('.el').addClass('class'); $('.el').removeClass('class'); $('.el').toggleClass('class'); // 原生方法 document.querySelector('.el').classList.add 阅读全文
posted @ 2016-01-29 11:25 JS小灰童鞋 阅读(200) 评论(0) 推荐(0)
图片验证码及自动刷新
摘要: <script> function imgCode() { $("#imgCode").on("click", function() { $(this).attr("src", '/user/verify?t=' + Math.random()); }); }; /* 当后台返回验证码错误时,绑定t 阅读全文
posted @ 2016-01-29 11:11 JS小灰童鞋 阅读(1197) 评论(0) 推荐(0)
上一页 1 2 3 4 5 下一页
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3