1. 程式人生 > >js 判斷是否是 iPhone X

js 判斷是否是 iPhone X

var isiOS;

function fnMoble() {

isiOS = /iphone/gi.test(navigator.userAgent) && (screen.height == 812 && screen.width == 375);

}