設(shè)備類(lèi)型判斷 if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { // 移動(dòng)端 } else { // pc }