31、原生JavaScript判断是否移动设备
1 function isMobile(){ 2 if (typeof this._isMobile === 'boolean'){ 3 return this._isMobile; 4 } 5 var screenWidth = this.getScreenWidth(); 6 var fixViewPortsExperiment = rendererModel.runningExperiments.FixViewport || rendererModel.runningExperiments.fixviewport; 7 var fixViewPortsExperimentRunning = fixViewPortsExperiment && (fixViewPortsExperiment.toLowerCase() === "new"); 8 if(!fixViewPortsExperiment){ 9 if(!