Code : Tout sélectionner
<script type="text/javascript">
function iPhoneAlert()
{
if((navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i))||(navigator.userAgent.match(/iPad/i)))
{
var question = confirm("Souhaitez-vous naviguer sur le site optimisé pour iPhone?")
if (question)
{
window.location = "http://iphone.votre_site.fr/";
}
else
{
}
}
}
</script>
Code : Tout sélectionner
<body onLoad="iPhoneAlert();">
Voilà, j'espère que cela vous sera utile
Note: j'ai trouvé ces information à l'adresse suivante: http://abel.foxylounge.com/Detecter-un- ... ch-et.html