现在的位置: 首页 > 综合 > 正文

javascript检测iPhone/iPod/iPad

2013年10月20日 ⁄ 综合 ⁄ 共 281字 ⁄ 字号 评论关闭

if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i))){

    document.write('<link href="iphone.css" rel="stylesheet" type="text/css">');
}
if((navigator.userAgent.match(/iPad/i))){
    document.write('<link href="ipadwoflash.css" rel="stylesheet" type="text/css">');

}

【上篇】
【下篇】

抱歉!评论已关闭.