1 $(function(){ 2 if (!navigator.userAgent.match(/mobile/i)) { 3 //PC端 4 }else{ 5 //移动端 6 } 7 })
1 $(function(){ 2 if (!navigator.userAgent.match(/mobile/i)) { 3 //PC端 4 }else{ 5 //移动端 6 } 7 })
转载于:https://www.cnblogs.com/suoking/p/5109862.html