ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
JS获取屏幕尺寸: ``` //定义变量获取屏幕视口宽度,手机尺寸<640,电脑尺寸>=40 var windowWidth = $(window).width(); if(windowWidth < 623) { console.log('手机尺寸'); } if(windowWidth >= 640) { console.log('电脑尺寸'); location.href = '/index.html'; } ``` 其他参考 js检测当前设备是移动端还是PC端:https://www.cnblogs.com/Im-Victor/p/9442355.html js判断当前设备:https://www.cnblogs.com/zhizou/p/11401742.html