获取元素样式的工具类
function getStyle(ele) {
var style = null;
if(window.getComputedStyle) {
style = window.getComputedStyle(ele, null);
}else{
style = ele.currentStyle;
}
return style;
}
function getStyle(ele) {
var style = null;
if(window.getComputedStyle) {
style = window.getComputedStyle(ele, null);
}else{
style = ele.currentStyle;
}
return style;
}
/*指定用户的唯一标识*/
function getLopKanUid(){
if(!localStorage.lop_kan_uid){
localStorage.lop_kan_uid = "lop_" + new Date().getTime() + parseInt(Math.random()*999999999);
}
return localStorage.lop_kan_uid;
}
/*获取指定地址栏参数方法*/
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return r[2]; return null;
}
/*时间格式处理*/
function gettime(value){
var s=Math.floor(value/60);
var m=value-(s*60);
s=s.toString();
m=m.toString();
if(m.length<=0){
m="0"+m;
}
if(s.length<=1){
s="0"+s;
}
return time=s+":"+m;
}