デバイスが iPad か iPhone かを検出しようとしていますが、エミュレーターで動作しません。iPadのサファリブラウザでテストすると動作します。違いはありますか?それは常にiphoneの「else」を使用します..
これは私のコードです:
var isiPad = navigator.userAgent.match(/iPad/i) != null;
$(document).ready(function(){
if(isiPad)
{
window.location.replace("tab/indexTabStart.html");
}
else {
window.location.replace("smart/indexSmartStart.html");
}
});
助けてくださいありがとう!