答案 0 :(得分:0)
对于您的问题2(如何在jquery中检测丝绸浏览器用户代理)
基本丝绸识别
if (/\bSilk\b/.test(navigator.userAgent)) {
alert("Silk detected!");
}
检测移动/桌面偏好
var match = /\bSilk\/(.*\bMobile Safari\b)?/.exec(navigator.userAgent);
if (match) {
alert("Detected Silk in mode "+(match[1] ? "Mobile" : "Default (desktop)"));
}