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) }) }