How To Make Java Script Detect For iPad

Below is an example of how you would detect the User Agent for the iPad, therefore redirecting the browser.

Code Example:

<html>
<head>
<script language="javascript" type="text/javascript">
<!--
if((navigator.userAgent.match(/iPad/i)))
{location.href='http://www.google.com';}
-->
</script>
</head>
<body>
JavaScript Re-Direct iPad to Google
</body>
</html>

Explanation:

The nuts and bolts of the script work as follows: The script says if the "navigator.userAgent" (The Browser) ".match(/iPad/i)" (Is Running On A iPad), then "{location.href='http://www.google.com';}" (Redirect The Browser To http://www.google.com ).

gears

Note: If you need to no How To Hide URL On iPhone iPod, How To Make A Java Script Detect For iPhone & iPod, or How To Make Apple Touch Icon Favicon For iPhone iPod see the links below.

See:
How To Hide URL On iPhone iPod
How To Make Java Script Detect For iPhone & iPod
How To Make Apple Touch Icon Favicon For iPhone iPod