日期:2014-05-16  浏览次数:20347 次

js 判断 字符串包含某字符串
  1. function?getType(){??
  2. ????????if(navigator.userAgent.indexOf("iPhone")?!=?-1)?{??
  3. ????????????alert("我是iPhone~!");??
  4. ????????}??
  5. ????????if(navigator.userAgent.indexOf("iPad")?!=?-1){??
  6. ????????????alert("我是iPad~!");??????}??
  7. ????} ?