iPhone/iPod Touch detection


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.