Posted By

peterbelsky on 04/16/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

chrisaiv


iphone javascript detect


 / Published in: JavaScript
 

URL: http://theflashblog.com/?p=1686

  1. <script type="text/javascript" language="javascript">
  2. <!--
  3. if((navigator.userAgent.match(/iPhone/i)) ||
  4. (navigator.userAgent.match(/iPod/i)))
  5. {
  6. document.getElementById("jj").innerHTML = "<a href=\"VIDEO_URL\"><img src=\"/images/jj.jpg\" /></a>";
  7. }
  8. -->
  9. </script>

Report this snippet  

You need to login to post a comment.