JavaScript 判断当前设备是否是移动端还是PC时间:2023-03-08 18:04:19if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){ alert('移动端')}else { alert('PC端') }