07 2016 档案
js判断用户是否禁用了cookie
摘要:function CookieEnable() { var result = false; if (navigator.cookiesEnabled) return true; document.cookie = "testcookie=yes;"; var cookieSet = document
阅读全文
使用Resource Owner Password Credentials Grant授权发放Token
摘要:对应的应用场景是:为自家的网站开发手机 App(非第三方 App),只需用户在 App 上登录,无需用户对 App 所能访问的数据进行授权。 客户端获取Token: 基于 Owin OAuth, 针对 Resource Owner Password Credentials Grant 的授权方式,只
阅读全文
判断网页是否是微信浏览器打开
摘要:我们知道 js 可以通过 window.navigator.userAgent 来获取浏览器的相关信息, 比如:Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.154 Safar
阅读全文
Angular.js参考
摘要:http://www.cnblogs.com/popo123/p/5673955.htmlhttps://www.angularjs.net.cn/tutorial/https://www.runoob.com/angularjs/angularjs-intro.html自定义指令:https://
阅读全文
redis学习(二) Redis Hash
摘要:Redis hash 是一个string类型的field和value的映射表,hash特别适合用于存储对象。 Redis 中每个 hash 可以存储 232 - 1 键值对(40多亿)。 redis 127.0.0.1:6379> HMSET w3ckey name "redis tutorial"
阅读全文
js定时器 setTimeout 和 setInterval 区别
摘要:setTimeout和setInterval的语法相同。它们都有两个参数,一个是将要执行的代码字符串,还有一个是以毫秒为单位的时间间隔,当过了那个时间段之后就将执行那段代码。不过这两个函数还是有区别的,setInterval在执行完一次代码之后,经过了那个固定的时间间隔,它还会自动重复执行代码,而s
阅读全文
js日期操作,js日期戳转日期
摘要:js日期戳转日期 function timestampToDateFormat(timestamp) { const dateObj = new Date(timestamp); // 创建Date对象 const year = dateObj.getFullYear(); // 获取年份 cons
阅读全文
jquery.validate.js客户端验证
摘要:参考:http://www.runoob.com/jquery/jquery-plugin-validate.html http://www.cnblogs.com/artech/archive/2012/06/17/client-validation-01.html 引用文件: <script t
阅读全文
redis安装
摘要:Redis安装教程:https://www.cnblogs.com/liuqingzheng/p/9831331.html下载地址:https://github.com/tporadowski/redis/releasesredis.windows-service.conf redis的配置文件,找
阅读全文
MVC Pager使用
摘要:View中加入引用:@using Webdiyer.WebControls.Mvc; 使用时代码: 后台Controller: 分页类: demo: Redis桌面管理器:http://redisdesktop.com/download 参考:http://www.webdiyer.com/mvcp
阅读全文