![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
javascript
蓝色的乌鸦
这个作者很懒,什么都没留下…
展开
-
随机生成姓名,姓名生成器
/** * 姓名生成器 * @returns {string} */window.createName = function() { let lastDict=["李","王","张","刘","陈","杨","赵","黄","周","吴","徐","孙","胡","朱","高","林","何","郭","马","罗","梁","宋","郑","谢","韩","唐","冯","于","董","萧","程","曹","袁","邓","许","傅","沈","曾","彭","吕","苏","..原创 2020-12-31 09:42:08 · 3999 阅读 · 0 评论 -
url参数转对象
let url="http://www.aaa.com?id=zhangsan&name=%E5%BC%A0%E4%B8%89&age=35&%E5%BC%A0%E4%B8%89=666";function queryString2Obj(url){ let str=url.split("?")[1]; let items=str.split("&"); let result={} let arr=[]; for(let i=0; i<items.leng.原创 2020-06-12 13:22:59 · 290 阅读 · 0 评论 -
js获取当前月份天数
var cur=new Date();//创建date//new Date(cur.getFullYear(),cur.getMonth()+1,0).getDate();//天数alert("当前月份有 "+new Date(cur.getFullYear(),cur.getMonth()+1,0).getDate()+"天");原创 2015-05-11 14:09:31 · 886 阅读 · 0 评论 -
js获取cookie
function parseCookies () { var list = {}; var cookie = document.cookie; cookie && cookie.split(";").forEach(function( cookie ) { var parts = cookie.split("="); list[parts.s原创 2015-08-27 09:00:19 · 542 阅读 · 0 评论 -
angularjs实现下拉加载更多
angularjs实现下拉加载更多数据,我是通过指令来实现的,直接上代码.directive("scroll", ["$window", "$document",function ($window, $document) { return function(scope, element) { angular.element($window).bind("scroll", ...原创 2015-09-22 09:07:32 · 6361 阅读 · 3 评论 -
HTML5文件上传FileReader API
很好的文章,很有帮助,以后会用到,自己先备注一下转载 2015-10-29 09:22:20 · 830 阅读 · 0 评论 -
JS检测设备类型
var browser = { versions : function() { var u = navigator.userAgent, app = navigator.appVersion; return { trident : u.indexOf('Trident')原创 2017-05-24 21:55:49 · 605 阅读 · 0 评论 -
AngularJS中$state.go携带参数跳转
第一种:参数会以?的形式出现在访问地址中?:userId会自动变为?userId=0010001$stateProvider.state('page.home', { url:"/home?:userId", templateUrl: "/html/homeView", controller: "homeController", title:"首页", params:...原创 2018-04-14 21:04:46 · 13301 阅读 · 1 评论