var ua = navigator.userAgent;
if(ua.match(/iPhone|iPod/i) != null){
console.log("iphone代码");
}
else if(ua.match(/Android/i) != null){
console.log("android代码");
}
else if(ua.match(/iPad/i) != null){
console.log("ipad代码");
}
var ua = navigator.userAgent;
if(ua.match(/iPhone|iPod/i) != null){
console.log("iphone代码");
}
else if(ua.match(/Android/i) != null){
console.log("android代码");
}
else if(ua.match(/iPad/i) != null){
console.log("ipad代码");
}