阅读全文>>
阅读全文>>
时间:2017-12-29
分类:
热度:
2393
$.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]]; ...阅读全文>>
时间:2017-12-29
分类:
热度:
2416
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
...阅读全文>>
时间:2017-12-26
分类:
热度:
8715
<select class="form-control input-sm" name="category" lay-filter="category" aria-invalid="false">
<option value="0">请选择运维位置</option>
...阅读全文>>
/*时间戳转换插件*/
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){
...阅读全文>>
时间:2017-12-14
分类:
热度:
2613
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": [
...阅读全文>>