//"ontouchend" in document会判断document內是否有这个值(是否支持触控),並把结果放进touch属性內,接着再extend进support里 $.extend($.support, { touch: "ontouchend" in document }); //$.support.touch就可以判断是否支持触控屏幕 alert($.support.touch); var supporttouch = "ontouchend" in document;
//"ontouchend" in document会判断document內是否有这个值(是否支持触控),並把结果放进touch属性內,接着再extend进support里 $.extend($.support, { touch: "ontouchend" in document }); //$.support.touch就可以判断是否支持触控屏幕 alert($.support.touch); var supporttouch = "ontouchend" in document;