摘要: function add(ele) { var e = $(ele), p = e.closest('.form-group'); p.before($('#template').text()); e.blur(); } 阅读全文
posted @ 2016-08-10 14:56 风吹过春天 阅读(576) 评论(0) 推荐(0) 编辑
摘要: //整数 function mustbeInteger(ele) { var e = $(ele); e.on('keyup', function() { var v = $(this).val(); if (v.length === 1) { $(this).val(v.replace(/[^1-9]/g, '')); } else { $(this).val... 阅读全文
posted @ 2016-08-10 14:47 风吹过春天 阅读(101) 评论(0) 推荐(0) 编辑
摘要: function Ajax(url, data, success, type, dataType, error) { this.url = url; this.data = typeof data == "string" ? $(data).serialize() : data; this.success = success; this.type = type |... 阅读全文
posted @ 2016-08-10 14:28 风吹过春天 阅读(212) 评论(0) 推荐(0) 编辑