コードコピーは次のとおりです。
var system = {};
var p = navigator.platform;
System.win = p.indexof( "win")== 0;
System.mac = p.indexof( "Mac")== 0;
System.x11 =(p == "x11")|| (p.indexof( "linux")== 0);
if(system.win || system.mac || system.xll){//コンピューターの場合は、Baiduにジャンプします
window.location.href = "http://www.baidu.com/";
} else {//携帯電話の場合は、Googleにジャンプします
window.location.href = "http://www.google.cn/";
}