当前位置: 代码迷 >> JavaScript >> js 判断 字符串包孕某字符串
  详细解决方案

js 判断 字符串包孕某字符串

热度:402   发布时间:2013-04-02 12:35:26.0
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. ????} ?
  相关解决方案