📅  最后修改于: 2022-03-11 15:01:17.940000             🧑  作者: Mango
function isTouchScreendevice() {
return 'ontouchstart' in window || navigator.maxTouchPoints;
};
if(isTouchScreendevice()){
alert("I am a touch screen device")
}