使用JS架框有现成的判断
例如motools架框中:
Browser.Platform.mac - (boolean) 当前操作系统是否为Mac
Browser.Platform.win - (boolean) 当前操作系统是否为Windows
Browser.Platform.linux - (boolean) 当前操作系统是否为Linux
Browser.Platform.ipod - (boolean) 当前操作系统是否为iPod Touch / iPhone
Browser.Platform.other - (boolean) 当前操作系统即不是Mac, 也不是Windows或Linux
Browser.Platform.name - (string) 当前操作系统的名称