标签:
function isArray(e){
var sign=false;
if(!!a && a instanceof Array && a.length){
sign=true;
}
return sign;
}
function isObject(e){
var sign=false;
if(!!a && a instanceof Object && !(a instanceof Array) && Object.keys(a).length){
sign=true;
}
return sign;
}
a.sort();a.reverse(); var tempList=[{"a":"sx","order":"2"},{"a":"sx","order":"34"}];
tempList.sort(function(a, b) {//顺序与倒离
return a.order - b.order;
});
function stopBubble(event) { //停止冒泡
var e = event || window.event;
if (e && e.stopPropagation )
e.stopPropagation();
else
window.event.cancelBubble = true;
}
function stopDefault(event) { //停止默认事件
var e = event || window.event;
if(e && e.preventDefault) {
e.preventDefault();
} else {
window.event.returnValue = false;
}
return false;
}
标签:
原文地址:http://www.cnblogs.com/jayruan/p/5246661.html