emer 发布于  2018-1-2 14:08 

将表单序列化成json格式

$.fn.serializeObject = function() { var o = {}; var a = this.serializeArray(); $.each(a, function() { if (o[this....
emer 发布于  2017-12-29 09:31 

ajax跨域上传图片

jQuery.extend({ handleError: function( s, xhr, status, e ) { // If a local callback was specified, fire it if ( s.error ) s.error( xhr, stat...
emer 发布于  2017-12-29 09:20 

layui获取select值

<select  class="form-control input-sm" name="category" lay-filter="category" aria-invalid="false">   ...
emer 发布于  2017-12-26 20:23 

layui时间戳转换工具

/*时间戳转换插件*/ layui.laytpl.toDateString = function(d, format){ if(!d){ return "" } var date = new Date(d || new Date()) ,ymd = [ this.digit(date.getFullYear(), 4) ,this.d...
emer 发布于  2017-12-21 15:25 

前端验证码

<canvas id="canvas" width="120" height="40"></canvas> <a href="#" id="changeImg">看不清,换一张</a> <script> /**生成一个随机数**/ function randomNum(min,max...
emer 发布于  2017-12-21 14:23 

layui 关闭父级打开的本窗口

var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index);
emer 发布于  2017-12-14 17:30 

当鼠标抬起进行数据搜索展现

$('.selectBox input').keyup(function() { var me = $(this), v = me.val().replace(/^\s+|\s+$/g,""); var lis = $(this).parents(".title").siblings(".content&qu...
emer 发布于  2017-12-8 13:38 

遍历显示(可用递归调用)暂无时间修改

var jsonDate=[ { "id": 1, "name": "电子", "editTime": "2010-01-01 12:12:12", "child": [ { "id": "11", ...
emer 发布于  2017-12-6 11:12 
emer 发布于  2017-12-6 09:09