Posted By

paul0078 on 04/15/12


Tagged

javascript iphone iPad browser-detect


Versions (?)

Detect iPhone and iPad


 / Published in: JavaScript
 

  1. if ((navigator.userAgent.indexOf('iPhone') != -1) || (navigator.userAgent.indexOf('iPod') != -1) || (navigator.userAgent.indexOf('iPad') != -1)) {
  2. alert('You are using an iPhone, ipod or an ipad');
  3. }

Report this snippet  

You need to login to post a comment.