热门 将表单序列化成json格式
时间:2017-12-29
分类:
热度:2419
$.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
分类:
热度:2448
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
分类:
热度:8754
<select class="form-control input-sm" name="category" lay-filter="category" aria-invalid="false">
<option value="0">请选择运维位置</option>
...
热门 layui时间戳转换工具
/*时间戳转换插件*/ 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()) ...热门 前端验证码
<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){ ...热门 layui 关闭父级打开的本窗口
时间:2017-12-14
分类:
热度:2656
var index = parent.layer.getFrameIndex(window.name);
parent.layer.close(index);
热门 当鼠标抬起进行数据搜索展现
$('.selectBox input').keyup(function() { var me = $(this), v = me.val().replace(/^\s+|\s+$/g,""); var lis = $(this).parents(".title").siblings(".content").find("li"); if(v==""){ lis.filter(":hidden").show(); ...热门 遍历显示(可用递归调用)暂无时间修改
var jsonDate=[ { "id": 1, "name": "电子", "editTime": "2010-01-01 12:12:12", "child": [ { "id": "11", "name": "电子产品", "editTime": "2010-01-01 12:12:12", "child": [ ...热门 css3新特性
时间:2017-12-6
分类:
热度:2451