Posted By

Nanobyte on 05/29/09


javascript detection iphone ipod touch

Versions (?)

Who likes this?

2 people have marked this snippet as a favorite


iPhone/iPod Touch detection

 / Published in: JavaScript

  1. if(window.navigator.userAgent.match(/(CPU iPhone OS)/))
  2. document.write('This is a iPhone or iPod Touch!');
  3. else
  4. document.write('This is NOT a iPhone or iPod Touch!');

Report this snippet  


RSS Icon Subscribe to comments
Posted By: parkarlsson on January 4, 2012

Try this snippet in order to detect iPod, Iphone and iPad in javascript:

You need to login to post a comment.