isIos

function IsIOS() {
    if (/(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)) {
        return true
    } else {
        return false
    }
}

function IsAndroid() {
    if (/(Android|Adr)/i.test(navigator.userAgent)) {
        return true
    } else {
        return false
    }
}

function uuid() {
    return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (a) {
        var r = Math.random() * 16 | 0,
            t = a == "x" ? r : r & 3 | 8;
        return t.toString(16)
    })
}

 

isIos

上一篇:java中Volatile修饰符的含义


下一篇:JAVA抽象类和接口