<script type=
"text/javascript"
>
var
u = navigator.userAgent;
var
isAndroid = u.indexOf(
'Android'
) > -1 || u.indexOf(
'Adr'
) > -1;
//android終端
var
isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/);
//ios終端
alert(
'是不是Android:'
+isAndroid);
alert(
'是不是iOS:'
+isiOS);
</script>