detect iphone phone javascript code example
Example: javascript detect ios device
function isIOSDevice(){
return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
}
if(isIOSDevice()){
console.log("I am an IOS device!");
}
function isIOSDevice(){
return !!navigator.platform && /iPad|iPhone|iPod/.test(navigator.platform);
}
if(isIOSDevice()){
console.log("I am an IOS device!");
}