热门 将表单序列化成json格式

时间:2017-12-29   作者:lininn   分类:   热度:2416°    
时间:2017-12-29   分类:    热度:2416  
$.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this.name]) { if (!o[this.name].push) { o[this.name] = [o[this.name]]; ...

阅读全文>>

热门 ajax跨域上传图片

时间:2017-12-29   作者:lininn   分类:   热度:2441°    
时间:2017-12-29   分类:    热度:2441  
jQuery.extend({ handleError: function( s, xhr, status, e ) { // If a local callback was specified, fire it if ( s.error ) s.error( xhr, status, e ); // If we have some XML response text (e.g. from an AJAX call) then log it in the console ...

阅读全文>>

热门 layui获取select值

时间:2017-12-26   作者:lininn   分类:   热度:8747°    
时间:2017-12-26   分类:    热度:8747  
<select  class="form-control input-sm" name="category" lay-filter="category" aria-invalid="false">       <option value="0">请选择运维位置</option>          ...

阅读全文>>

热门 layui时间戳转换工具

时间:2017-12-21   作者:lininn   分类: Html   热度:4324°    
时间:2017-12-21   分类: Html    热度:4324  
/*时间戳转换插件*/ layui.laytpl.toDateString = function(d, format){ if(!d){ return "" } var date = new Date(d || new Date()) ,ymd = [ this.digit(date.getFullYear(), 4) ,this.digit(date.getMonth() + 1) ,this.digit(date.getDate()) ] ,hms = [ this.digit(date.getHours()) ...

阅读全文>>

热门 前端验证码

时间:2017-12-21   作者:lininn   分类: Html   热度:2140°    
时间:2017-12-21   分类: Html    热度:2140  
<canvas id="canvas" width="120" height="40"></canvas> <a href="#" id="changeImg">看不清,换一张</a> <script> /**生成一个随机数**/ function randomNum(min,max){ return Math.floor( Math.random()*(max-min)+min); } /**生成一个随机色**/ function randomColor(min,max){ ...

阅读全文>>

返回顶部    首页    手机版本    后花园   会员注册   
版权所有:覆手为雨    站长: lininn