Javascript

From Wikinico

Jump to: navigation, search

Detect IPhone

<script type="text/javascript">// <![CDATA[ if ((navigator.userAgent.indexOf('/iPhone/i') != -1) || (navigator.userAgent.indexOf('/iPod/i') != -1)) { document.location = "http://www.mysite.com/iphone.html"; } // ]]></script>

Personal tools