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