Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var agent = navigator.userAgent;
- if (agent.match(/ipod|iphone/i)) {
- alert('iphone/ipod');
- }
- else if (agent.match(/ipad/i)) {
- alert('ipad');
- }
- else {
- alert('neither ipad nor iphone nor ipod');
- }
Add Comment
Please, Sign In to add comment